Skip to content

Commit

Permalink
remove pretty printer in production mode
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthieuCoder authored Jan 12, 2025
1 parent c8f7386 commit f884783
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/oriond/oriond.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ func main() {
flag.Parse()

// Default level for this example is info, unless debug flag is present
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
zerolog.SetGlobalLevel(zerolog.InfoLevel)
if *enable_prof {
go func() {
fmt.Println(http.ListenAndServe(*pprof, nil))
}()
}
if *debug {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
zerolog.SetGlobalLevel(zerolog.DebugLevel)
}

Expand Down
2 changes: 1 addition & 1 deletion bin/registry/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ func main() {
// Setup logging
zerolog.TimeFieldFormat = zerolog.TimeFormatUnix
flag.Parse()
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
// Default level for this example is info, unless debug flag is present
zerolog.SetGlobalLevel(zerolog.InfoLevel)
if *enable_prof {
Expand All @@ -41,6 +40,7 @@ func main() {
}()
}
if *debug {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
zerolog.SetGlobalLevel(zerolog.DebugLevel)
}
privateKey, chain := internal.LoadPemFile()
Expand Down

0 comments on commit f884783

Please sign in to comment.