summaryrefslogtreecommitdiffstats
path: root/matterbridge.go
diff options
context:
space:
mode:
authorDuco van Amstel <duco.vanamstel@gmail.com>2018-12-26 15:16:09 +0100
committerWim <wim@42.be>2018-12-26 15:16:09 +0100
commitda8e415ae1fb899df4fb05a8a81934e205fb4765 (patch)
treefca9a1b2b26c9971cf0e21e8e53ac8014cd77ccf /matterbridge.go
parent1b834c6858d6fdb8927f6a75fad2116d6d2bd394 (diff)
downloadmatterbridge-msglm-da8e415ae1fb899df4fb05a8a81934e205fb4765.tar.gz
matterbridge-msglm-da8e415ae1fb899df4fb05a8a81934e205fb4765.tar.bz2
matterbridge-msglm-da8e415ae1fb899df4fb05a8a81934e205fb4765.zip
Use logrus imports instead of log (#662)
Diffstat (limited to 'matterbridge.go')
-rw-r--r--matterbridge.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/matterbridge.go b/matterbridge.go
index 894051b0..cb627a11 100644
--- a/matterbridge.go
+++ b/matterbridge.go
@@ -11,7 +11,7 @@ import (
"github.com/42wim/matterbridge/gateway/bridgemap"
"github.com/google/gops/agent"
prefixed "github.com/matterbridge/logrus-prefixed-formatter"
- log "github.com/sirupsen/logrus"
+ "github.com/sirupsen/logrus"
)
var (
@@ -20,8 +20,8 @@ var (
)
func main() {
- log.SetFormatter(&prefixed.TextFormatter{PrefixPadding: 13, DisableColors: true, FullTimestamp: true})
- flog := log.WithFields(log.Fields{"prefix": "main"})
+ logrus.SetFormatter(&prefixed.TextFormatter{PrefixPadding: 13, DisableColors: true, FullTimestamp: true})
+ flog := logrus.WithFields(logrus.Fields{"prefix": "main"})
flagConfig := flag.String("conf", "matterbridge.toml", "config file")
flagDebug := flag.Bool("debug", false, "enable debug")
flagVersion := flag.Bool("version", false, "show version")
@@ -39,9 +39,9 @@ func main() {
return
}
if *flagDebug || os.Getenv("DEBUG") == "1" {
- log.SetFormatter(&prefixed.TextFormatter{PrefixPadding: 13, DisableColors: true, FullTimestamp: false, ForceFormatting: true})
+ logrus.SetFormatter(&prefixed.TextFormatter{PrefixPadding: 13, DisableColors: true, FullTimestamp: false, ForceFormatting: true})
flog.Info("Enabling debug")
- log.SetLevel(log.DebugLevel)
+ logrus.SetLevel(logrus.DebugLevel)
}
flog.Printf("Running version %s %s", version, githash)
if strings.Contains(version, "-dev") {