mirror of
https://github.com/eosswedenorg/thalos
synced 2026-07-03 11:53:41 +02:00
cmd/thalos/main.go: move log init function to app/log/init.go
This commit is contained in:
parent
aa6d5c9181
commit
5834e60633
2 changed files with 15 additions and 10 deletions
15
app/log/init.go
Normal file
15
app/log/init.go
Normal 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)
|
||||||
|
}
|
||||||
|
|
@ -128,16 +128,6 @@ func run() {
|
||||||
running = false
|
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 {
|
func getChain(def string) string {
|
||||||
if len(conf.Ship.Chain) > 0 {
|
if len(conf.Ship.Chain) > 0 {
|
||||||
return conf.Ship.Chain
|
return conf.Ship.Chain
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue