diff --git a/app/log/init.go b/app/log/init.go new file mode 100644 index 0000000..530a6a8 --- /dev/null +++ b/app/log/init.go @@ -0,0 +1,15 @@ +package log + +import ( + log "github.com/sirupsen/logrus" +) + +func init() { + // Initialize logger + formatter := log.TextFormatter{ + FullTimestamp: true, + TimestampFormat: "2006-01-02 15:04:05.0000", + } + + log.SetFormatter(&formatter) +} diff --git a/cmd/thalos/main.go b/cmd/thalos/main.go index e8e5b66..fbd7226 100644 --- a/cmd/thalos/main.go +++ b/cmd/thalos/main.go @@ -128,16 +128,6 @@ func run() { running = false } -func init() { - // Initialize logger - formatter := log.TextFormatter{ - FullTimestamp: true, - TimestampFormat: "2006-01-02 15:04:05.0000", - } - - log.SetFormatter(&formatter) -} - func getChain(def string) string { if len(conf.Ship.Chain) > 0 { return conf.Ship.Chain