mirror of
https://github.com/moby/moby.git
synced 2026-01-06 07:21:23 +03:00
Add --log-level support
Next steps, in another PR, would be: - make all logging go through the logrus stuff - I'd like to see if we can remove the env var stuff (like DEBUG) but we'll see Closes #5198 Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
@@ -6,11 +6,7 @@ import (
|
||||
log "github.com/Sirupsen/logrus"
|
||||
)
|
||||
|
||||
func initLogging(debug bool) {
|
||||
func initLogging(lvl log.Level) {
|
||||
log.SetOutput(os.Stderr)
|
||||
if debug {
|
||||
log.SetLevel(log.DebugLevel)
|
||||
} else {
|
||||
log.SetLevel(log.InfoLevel)
|
||||
}
|
||||
log.SetLevel(lvl)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user