1
0
forked from lug/matterbridge

Make matterclient work with prefixed log

This commit is contained in:
Wim
2018-02-21 01:11:41 +01:00
parent 5f3b6ec007
commit 67d2398fa8
3 changed files with 12 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ var (
)
func main() {
log.SetFormatter(&prefixed.TextFormatter{PrefixPadding: 10, DisableColors: true, FullTimestamp: true})
log.SetFormatter(&prefixed.TextFormatter{PrefixPadding: 13, DisableColors: true, FullTimestamp: true})
flog := log.WithFields(log.Fields{"prefix": "main"})
flagConfig := flag.String("conf", "matterbridge.toml", "config file")
flagDebug := flag.Bool("debug", false, "enable debug")
@@ -34,7 +34,7 @@ func main() {
return
}
if *flagDebug || os.Getenv("DEBUG") == "1" {
log.SetFormatter(&prefixed.TextFormatter{PrefixPadding: 10, DisableColors: true, FullTimestamp: false})
log.SetFormatter(&prefixed.TextFormatter{PrefixPadding: 13, DisableColors: true, FullTimestamp: false})
flog.Info("Enabling debug")
log.SetLevel(log.DebugLevel)
}