common: fix unclosed logrus logging pipes
This commit is contained in:
parent
0c325137cf
commit
1cde7e341b
4 changed files with 67 additions and 36 deletions
|
|
@ -80,10 +80,12 @@ func main() {
|
|||
}
|
||||
|
||||
logrus.Info("Loaded configuration:")
|
||||
err = DumpConfig(*config, logrus.StandardLogger().WriterLevel(logrus.InfoLevel))
|
||||
dumpWriter := logrus.StandardLogger().WriterLevel(logrus.DebugLevel)
|
||||
err = DumpConfig(*config, dumpWriter)
|
||||
if err != nil {
|
||||
logrus.Fatalf("Error printing configuration: %v", err)
|
||||
}
|
||||
dumpWriter.Close()
|
||||
|
||||
if config.DeploymentChannel != "" {
|
||||
logrus.AddHook(&slogger.EnvironmentHook{Channel: config.DeploymentChannel})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue