feat(logger): 日志系统升级 — 双通道输出 + caller/traceId + 脱敏

- 开发环境 pino-pretty 彩色输出,生产环境 pino-roll 滚动写入 /var/log/trade/data
- mixin 自动附加调用位置(caller)和 traceId 到每条日志
- redact 自动脱敏 api_key/api_secret 等敏感字段
- 新增 withTrace() 支持异步上下文 traceId 传递
- 新增 pino-roll 依赖
This commit is contained in:
Rekey
2026-06-17 12:05:48 +08:00
parent 4294ec401d
commit e252cbca9b
3 changed files with 134 additions and 13 deletions
+1
View File
@@ -21,6 +21,7 @@
"pg": "^8.21.0",
"pino": "^10.3.1",
"pino-pretty": "^13.1.3",
"pino-roll": "^4.0.0",
"rxjs": "^7.8.2",
"typeorm": "^1.0.0",
"yaml": "^2.9.0"