mirror of https://github.com/status-im/consul.git
agent: log error when agent crashes in an early stage (#7411)
This commit is contained in:
parent
5f625666b4
commit
f8ded993af
|
@ -221,6 +221,7 @@ func (c *cmd) run(args []string) int {
|
|||
memSink, err := lib.InitTelemetry(config.Telemetry)
|
||||
if err != nil {
|
||||
c.logger.Error(err.Error())
|
||||
logGate.Flush()
|
||||
return 1
|
||||
}
|
||||
|
||||
|
@ -229,6 +230,7 @@ func (c *cmd) run(args []string) int {
|
|||
agent, err := agent.New(config, c.logger)
|
||||
if err != nil {
|
||||
c.logger.Error("Error creating agent", "error", err)
|
||||
logGate.Flush()
|
||||
return 1
|
||||
}
|
||||
agent.LogOutput = logOutput
|
||||
|
|
Loading…
Reference in New Issue