mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
logging: start server after log is configured
Without this "logging server started" is written to stderr
This commit is contained in:
parent
fd06992236
commit
29d90cfdd9
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user