zhangzengfei
2024-04-16 512876288b495eefb478d4aeb931e7e3ff6c22dd
config/config.go
@@ -2,6 +2,7 @@
import (
   "fmt"
   "gat1400Exchange/pkg/logger"
   "github.com/fsnotify/fsnotify"
   "github.com/spf13/viper"
@@ -63,4 +64,14 @@
   v.UnmarshalKey("log", LogConf)
   v.UnmarshalKey("forward", ForwardConf)
   v.UnmarshalKey("rate-limit", RateLimitConf)
   if LogConf.Level == "" {
      LogConf.Level = "info"
   }
   if ForwardConf.ReportInterval == 0 {
      ForwardConf.ReportInterval = 10
   }
   logger.SetLogLevel(LogConf.Level)
}