5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-26 05:31:34 +00:00

Use always formatted logging when debug is enabled

This commit is contained in:
Wim 2018-02-22 22:57:34 +01:00
parent 7b21c1c2f4
commit c5ecd09172
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ func main() {
return return
} }
if *flagDebug || os.Getenv("DEBUG") == "1" { if *flagDebug || os.Getenv("DEBUG") == "1" {
log.SetFormatter(&prefixed.TextFormatter{PrefixPadding: 13, DisableColors: true, FullTimestamp: false}) log.SetFormatter(&prefixed.TextFormatter{PrefixPadding: 13, DisableColors: true, FullTimestamp: false, ForceFormatting: true})
flog.Info("Enabling debug") flog.Info("Enabling debug")
log.SetLevel(log.DebugLevel) log.SetLevel(log.DebugLevel)
} }

View File

@ -81,7 +81,7 @@ func New(login, pass, team, server string) *MMClient {
} }
func (m *MMClient) SetDebugLog() { func (m *MMClient) SetDebugLog() {
log.SetFormatter(&prefixed.TextFormatter{PrefixPadding: 13, DisableColors: true, FullTimestamp: false}) log.SetFormatter(&prefixed.TextFormatter{PrefixPadding: 13, DisableColors: true, FullTimestamp: false, ForceFormatting: true})
} }
func (m *MMClient) SetLogLevel(level string) { func (m *MMClient) SetLogLevel(level string) {