Merge pull request #4384 from hashicorp/b-global-log-flags

agent: global logger should use the same flags
This commit is contained in:
Michael Schurter
2018-06-06 15:15:15 -07:00
committed by GitHub

View File

@@ -81,6 +81,9 @@ func NewAgent(config *Config, logOutput io.Writer, inmem *metrics.InmemSink) (*A
InmemSink: inmem,
}
// Global logger should match internal logger as much as possible
log.SetFlags(log.LstdFlags | log.Lmicroseconds)
if err := a.setupConsul(config.Consul); err != nil {
return nil, fmt.Errorf("Failed to initialize Consul client: %v", err)
}