Skip to content

Commit 8279de5

Browse files
committed
fixing merge conflict
1 parent f3e3821 commit 8279de5

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

backend/cmd/start.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package cmd
33
import (
44
"context"
55
"fmt"
6+
globalLogging "github.com/sensu/sensu-go/util/logging"
67
"io"
78
"log"
89
"net/http"
@@ -368,6 +369,12 @@ func StartCommand(initialize InitializeFunc) *cobra.Command {
368369
}
369370
}
370371

372+
// initialize global log level registry
373+
if viper.GetString(flagLogLevel) != "" {
374+
globalLogging.InitLogLevel(viper.GetString(flagLogLevel))
375+
globalLogging.SetAllLoggersLevel(viper.GetString(flagLogLevel))
376+
}
377+
371378
if viper.GetBool(flagLogMillisecondTime) {
372379
cfg.EtcdLogTimestampLayout = timestampFormatMillisecond
373380
}
@@ -676,7 +683,7 @@ func flagSet(server bool) *pflag.FlagSet {
676683
_ = flagSet.String(flagEventLogBufferWait, "10ms", "full buffer wait time")
677684
}
678685

679-
flagSet.SetOutput(ioutil.Discard)
686+
flagSet.SetOutput(io.Discard)
680687

681688
return flagSet
682689
}

0 commit comments

Comments
 (0)