From e094f4d0fcc25edc29b7f21ee9dd3699d7d5450a Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期五, 29 三月 2024 12:38:46 +0800
Subject: [PATCH] 调整日志打印
---
config/config.go | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/config/config.go b/config/config.go
index c5b686c..1a3271d 100644
--- a/config/config.go
+++ b/config/config.go
@@ -2,6 +2,7 @@
import (
"fmt"
+ "gat1400Exchange/pkg/logger"
"github.com/fsnotify/fsnotify"
"github.com/spf13/viper"
@@ -63,4 +64,10 @@
v.UnmarshalKey("log", LogConf)
v.UnmarshalKey("forward", ForwardConf)
v.UnmarshalKey("rate-limit", RateLimitConf)
+
+ if LogConf.Level == "" {
+ LogConf.Level = "info"
+ }
+
+ logger.SetLogLevel(LogConf.Level)
}
--
Gitblit v1.8.0