logging: start server after log is configured

Without this "logging server started" is written to stderr
This commit is contained in:
Sergey Ponomarev 2020-11-19 11:21:27 +02:00
parent fd06992236
commit 29d90cfdd9

View File

@ -61,15 +61,18 @@ func Init() *CTopLogger {
[]statusMsg{}, []statusMsg{},
} }
if debugMode() { debugMode := debugMode()
if debugMode {
level = logging.DEBUG level = logging.DEBUG
StartServer()
} }
backendLvl := logging.AddModuleLevel(Log.backend) backendLvl := logging.AddModuleLevel(Log.backend)
backendLvl.SetLevel(level, "") backendLvl.SetLevel(level, "")
logging.SetBackend(backendLvl) logging.SetBackend(backendLvl)
if debugMode {
StartServer()
}
Log.Notice("logger initialized") Log.Notice("logger initialized")
} }
return Log return Log