fix: 注释掉日志输出以减少启动时的冗余信息
This commit is contained in:
@@ -258,7 +258,7 @@ func InitLogger(logFile string, period int, count int, prefix string, logLevel L
|
|||||||
|
|
||||||
logWriter := getLogWriter(logFile, period, count)
|
logWriter := getLogWriter(logFile, period, count)
|
||||||
Elogger = NewEmsLogger3(logWriter, prefix, DEFAULT_LOG_FLAG, logLevel)
|
Elogger = NewEmsLogger3(logWriter, prefix, DEFAULT_LOG_FLAG, logLevel)
|
||||||
fmt.Printf("logFile=%s, period=%d, count=%d, prefix=%s, logLevel=%s\n", logFile, period, count, prefix, GetLevelString())
|
// fmt.Printf("logFile=%s, period=%d, count=%d, prefix=%s, logLevel=%s\n", logFile, period, count, prefix, GetLevelString())
|
||||||
return logWriter
|
return logWriter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
6
main.go
6
main.go
@@ -172,9 +172,9 @@ func loadFeatures(app *gin.Engine) {
|
|||||||
conf := featuresCfg.GetYamlConfig()
|
conf := featuresCfg.GetYamlConfig()
|
||||||
|
|
||||||
log.InitLogger(conf.Logger.File, conf.Logger.Duration, conf.Logger.Count, "omc:restagent", featuresCfg.GetLogLevel())
|
log.InitLogger(conf.Logger.File, conf.Logger.Duration, conf.Logger.Count, "omc:restagent", featuresCfg.GetLogLevel())
|
||||||
fmt.Printf("OMC Version: %s\n", config.Version)
|
// fmt.Printf("OMC Version: %s\n", config.Version)
|
||||||
log.Infof("========================= OMC Startup =========================")
|
// log.Infof("========================= OMC Startup =========================")
|
||||||
log.Infof("OMC Version: %s %s %s", config.Version, config.BuildTime, config.GoVer)
|
// log.Infof("OMC Version: %s %s %s", config.Version, config.BuildTime, config.GoVer)
|
||||||
|
|
||||||
mml.InitMML()
|
mml.InitMML()
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ func initViper(configDir *embed.FS) {
|
|||||||
|
|
||||||
// 当期服务环境运行配置 => local
|
// 当期服务环境运行配置 => local
|
||||||
env := conf.GetString("env")
|
env := conf.GetString("env")
|
||||||
log.Printf("current service environment configuration => %s \n", env)
|
// log.Printf("current service environment configuration => %s \n", env)
|
||||||
|
|
||||||
// 加载运行配置文件合并相同配置
|
// 加载运行配置文件合并相同配置
|
||||||
envConfigPath := fmt.Sprintf("config/config.%s.yaml", env)
|
envConfigPath := fmt.Sprintf("config/config.%s.yaml", env)
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ func ImportSQL() {
|
|||||||
processSQLFile(db, sqlPath)
|
processSQLFile(db, sqlPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Println("process success")
|
// log.Println("process success")
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user