Skip to content

Commit

Permalink
implement missing log.level cmdline flag
Browse files Browse the repository at this point in the history
  • Loading branch information
psycofdj committed Jul 7, 2021
1 parent c685d52 commit 273a8f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions credhub_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ func main() {
kingpin.HelpFlag.Short('h')
kingpin.Parse()

log.SetLevel(log.ErrorLevel)
if lvl, err := log.ParseLevel(*logLevel); err == nil {
log.SetLevel(lvl)
}
log.SetOutput(os.Stderr)
if *logStream == "stdout" {
log.SetOutput(os.Stdout)
Expand Down

0 comments on commit 273a8f8

Please sign in to comment.