Fix #7 Log formatting (#27)

Thanks for this.
This commit is contained in:
Nacef LABIDI 2018-12-17 03:53:29 +01:00 committed by Steve Brunton
parent 3d56bb040c
commit 8d1c2e7700
1 changed files with 6 additions and 0 deletions

View File

@ -68,6 +68,12 @@ func configureLog() {
}
log.SetLevel(ll)
if *logFormat == "text" {
log.SetFormatter(&log.TextFormatter{})
} else {
log.SetFormatter(&log.JSONFormatter{})
}
}
func loadConfig() (*config.Config, error) {