From f22b69ff61a5795a2e1242091cc35bce0bd8c803 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期二, 16 四月 2024 14:41:47 +0800
Subject: [PATCH] 修复更新操作
---
config/config.go | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/config/config.go b/config/config.go
index c5b686c..87dbe60 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,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)
}
--
Gitblit v1.8.0