mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
cmd/cli: adopt FilteredLevelWriter when doing internal logging
Without verbose log, we use internal log writer with log level set to debug. However, this will affect other writers, like console log, since they are default to notice level. By adopting FilteredLevelWriter, we can make internal log writer run in debug level, but all others will run in default level instead.
This commit is contained in:
committed by
Cuong Manh Le
parent
02ee113b95
commit
8a96b8bec4
@@ -266,10 +266,10 @@ func run(appCallback *AppCallback, stopCh chan struct{}) {
|
||||
|
||||
// Log config do not have thing to validate, so it's safe to init log here,
|
||||
// so it's able to log information in processCDFlags.
|
||||
initLogging()
|
||||
logWriters := initLogging()
|
||||
|
||||
// Initializing internal logging after global logging.
|
||||
p.initInternalLogging()
|
||||
p.initInternalLogging(logWriters)
|
||||
|
||||
mainLog.Load().Info().Msgf("starting ctrld %s", curVersion())
|
||||
mainLog.Load().Info().Msgf("os: %s", osVersion())
|
||||
|
||||
Reference in New Issue
Block a user