mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-07-04 01:07:49 +02:00
cmd/cli: fix missing runtime log for startup
The runtime internal log should be initialized right after normal log from configuration, prevent missing log from any actions that could be happened between two initializations.
This commit is contained in:
committed by
Cuong Manh Le
parent
eff5ff580b
commit
8bd3b9e474
+1
-2
@@ -560,13 +560,12 @@ func (p *prog) run(reload bool, reloadCh chan struct{}) {
|
||||
if !reload {
|
||||
// Stop writing log to unix socket.
|
||||
consoleWriter.Out = os.Stdout
|
||||
logWriters := initLoggingWithBackup(false)
|
||||
p.initLogging(false)
|
||||
if p.logConn != nil {
|
||||
_ = p.logConn.Close()
|
||||
}
|
||||
go p.apiConfigReload()
|
||||
p.postRun()
|
||||
p.initInternalLogging(logWriters)
|
||||
}
|
||||
wg.Wait()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user