mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 07:06:42 +08:00
logging: start server after log is configured
Without this "logging server started" is written to stderr
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user