开放接口增加详细调试日志,并支持控制台与文件双写

- OPEN_API_DEBUG 记录鉴权、查单、推送业务字段与 req_id
- LOG_FILE 默认 logs/app.log,标准日志/Gin/GORM 同时输出控制台与文件
This commit is contained in:
yml2213
2026-07-20 21:48:52 +08:00
parent 24d4e76c7f
commit 47b0dd5a49
12 changed files with 313 additions and 20 deletions
+2
View File
@@ -20,6 +20,7 @@ type Handlers struct {
OpenAPIKey string
OpenAPISecret string
OpenSignSkew int64
OpenAPIDebug bool
}
func Setup(h *Handlers) *gin.Engine {
@@ -48,6 +49,7 @@ func Setup(h *Handlers) *gin.Engine {
APIKey: h.OpenAPIKey,
APISecret: h.OpenAPISecret,
SkewSeconds: h.OpenSignSkew,
Debug: h.OpenAPIDebug,
}))
{
open.GET("/orders/:order_no", h.Open.QueryOrder)