summaryrefslogtreecommitdiffstats
path: root/matterbridge.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-10-28 14:50:35 +0200
committerWim <wim@42.be>2017-10-28 14:50:35 +0200
commitb461fc5e404c6e0df7289477171cad629cddb3e6 (patch)
tree37a832c3a08536d22bd3c6488215cffcad91bd24 /matterbridge.go
parentb7a8c6b60fbb9c26db7b427bcf95332efc697ba7 (diff)
downloadmatterbridge-msglm-b461fc5e404c6e0df7289477171cad629cddb3e6.tar.gz
matterbridge-msglm-b461fc5e404c6e0df7289477171cad629cddb3e6.tar.bz2
matterbridge-msglm-b461fc5e404c6e0df7289477171cad629cddb3e6.zip
Add support for DEBUG=1 envvar to enable debug. Closes #283
Diffstat (limited to 'matterbridge.go')
-rw-r--r--matterbridge.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/matterbridge.go b/matterbridge.go
index aa1cebd7..e62b6be8 100644
--- a/matterbridge.go
+++ b/matterbridge.go
@@ -7,6 +7,7 @@ import (
"github.com/42wim/matterbridge/gateway"
log "github.com/Sirupsen/logrus"
"github.com/google/gops/agent"
+ "os"
"strings"
)
@@ -33,7 +34,7 @@ func main() {
fmt.Printf("version: %s %s\n", version, githash)
return
}
- if *flagDebug {
+ if *flagDebug || os.Getenv("DEBUG") == "1" {
log.Info("Enabling debug")
log.SetLevel(log.DebugLevel)
}