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
1 changed files with 6 additions and 3 deletions

View File

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