1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-16 04:24:56 +02:00

cmd/thalos/main.go: move log init function to app/log/init.go

This commit is contained in:
Henrik Hautakoski 2023-06-15 11:38:10 +02:00
parent aa6d5c9181
commit 5834e60633
2 changed files with 15 additions and 10 deletions

15
app/log/init.go Normal file
View file

@ -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)
}

View file

@ -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