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{},
|
||||
}
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user