From c5ecd091729930e7c2e0c37472cd7738e1c2c495 Mon Sep 17 00:00:00 2001 From: Wim Date: Thu, 22 Feb 2018 22:57:34 +0100 Subject: Use always formatted logging when debug is enabled --- matterbridge.go | 2 +- matterclient/matterclient.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/matterbridge.go b/matterbridge.go index 1b3e2bec..13293ced 100644 --- a/matterbridge.go +++ b/matterbridge.go @@ -34,7 +34,7 @@ func main() { return } 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") log.SetLevel(log.DebugLevel) } diff --git a/matterclient/matterclient.go b/matterclient/matterclient.go index 27e96163..f539a76d 100644 --- a/matterclient/matterclient.go +++ b/matterclient/matterclient.go @@ -81,7 +81,7 @@ func New(login, pass, team, server string) *MMClient { } 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) { -- cgit v1.2.3