mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-03-25 23:30:41 +01:00
cmd/cli: add internal logging
So in case of no logging enabled, useful data could be sent to ControlD server for further troubleshooting.
This commit is contained in:
committed by
Cuong Manh Le
parent
a63a30c76b
commit
cd5619a05b
@@ -1100,6 +1100,8 @@ NOTE: Uninstalling will set DNS to values provided by DHCP.`,
|
||||
},
|
||||
}
|
||||
rootCmd.AddCommand(upgradeCmd)
|
||||
|
||||
initLogCmd()
|
||||
}
|
||||
|
||||
// isMobile reports whether the current OS is a mobile platform.
|
||||
@@ -1231,6 +1233,9 @@ func run(appCallback *AppCallback, stopCh chan struct{}) {
|
||||
// so it's able to log information in processCDFlags.
|
||||
initLogging()
|
||||
|
||||
// Initializing internal logging after global logging.
|
||||
p.initInternalLogging()
|
||||
|
||||
mainLog.Load().Info().Msgf("starting ctrld %s", curVersion())
|
||||
mainLog.Load().Info().Msgf("os: %s", osVersion())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user