Browse Source

wip:日志打印提交

wangkaiyue 10 months ago
parent
commit
abbd91d7f7
2 changed files with 5 additions and 0 deletions
  1. 4 0
      zhimaPush/config.yaml
  2. 1 0
      zhimaPush/main.go

+ 4 - 0
zhimaPush/config.yaml

@@ -13,6 +13,10 @@ mongodb:
     userName: "jyDevGroup"
     password: "jy@DevGroup"
 
+logger:
+  level: "info" #all info warn
+  path: "logs" # 日志文件路径。默认为空,表示关闭,仅输出到终端
+  file: "{Y-m-d}.log" # 日志文件格式。默认为"{Y-m-d}.log"
 
 redis:
   default: # 配置seo的redis

+ 1 - 0
zhimaPush/main.go

@@ -218,6 +218,7 @@ func (m *pushManager) DoPush(ctx context.Context, pv, uv int, ent, sid, dateStr
 	if err := gconv.Struct(res.ReadAll(), &pushResp); err != nil {
 		return 0, err
 	}
+	g.Log().Debug(ctx, pushResp)
 	if pushResp.ZhimaCreditEpAcceptanceLabelUseResponse.Msg == "Success" {
 		return 1, nil
 	} else {