升级依赖库

This commit is contained in:
2024-07-22 16:40:33 +08:00
parent b4444c778e
commit 726f6b5911
8 changed files with 47 additions and 203 deletions

View File

@ -104,8 +104,8 @@ func initServer(wsInstance abstract.IWebsocket) {
panic(wsInstance.GetModuleFlag() + " 模块开启了日志记录,但是没有配置日志路径")
}
var (
err error
logConf *logger.RotateLogConfig
// err error
// logConf *logger.RotateLogConfig
)
optionList := make([]logger.SetLoggerOptionFunc, 0)
if s.conf.LogConsole {
@ -117,14 +117,14 @@ func initServer(wsInstance abstract.IWebsocket) {
if len(s.conf.LogFile) == 0 {
s.conf.LogFile = wsInstance.GetModuleFlag() + ".log"
}
if logConf, err = logger.NewRotateLogConfig(s.conf.LogPath, s.conf.LogFile, logger.WithTimeIntervalType(s.conf.LogSplitInterval)); nil != err {
/*if logConf, err = logger.NewRotateLogConfig(s.conf.LogPath, s.conf.LogFile, logger.WithTimeIntervalType(s.conf.LogSplitInterval)); nil != err {
panic(wsInstance.GetModuleFlag() + " 模块开启了日志记录,日志初始化失败, 失败原因 : " + err.Error())
}
if loggerInstance, err := logger.NewLogger(s.conf.LogLevel, logConf, optionList...); nil != err {
}*/
/*if loggerInstance, err := logger.NewLogger(s.conf.LogLevel, logConf, optionList...); nil != err {
panic(wsInstance.GetModuleFlag() + " 模块开启了日志记录,日志初始化失败, 失败原因 : " + err.Error())
} else {
loggerInstanceTable[wsInstance.GetModuleFlag()] = loggerInstance
}
}*/
}
if nil == loggerInstanceTable[wsInstance.GetModuleFlag()] && s.conf.LogConsole {
// 没有配置文件日志, 但是配置了控制台输出