Commit 8a7f41d3 authored by Joerg-Holger Panzer's avatar Joerg-Holger Panzer
Browse files

Update timezone

parent 1acce36a
Pipeline #298580 passed with stages
in 8 minutes and 17 seconds
......@@ -3,6 +3,7 @@ package util
import (
"fmt"
"os"
"time"
"github.com/olivere/elastic"
"github.com/sirupsen/logrus"
......@@ -399,17 +400,17 @@ func init() {
log.SetFormatter(
&logrus.JSONFormatter{
TimestampFormat: "",
DisableTimestamp: false,
DataKey: "",
TimestampFormat: "",
DisableTimestamp: false,
DisableHTMLEscape: false,
DataKey: "",
FieldMap: logrus.FieldMap{
logrus.FieldKeyTime: "@timestamp",
logrus.FieldKeyLevel: "level_name",
logrus.FieldKeyMsg: "Message",
//logrus.FieldKeyFunc: "caller",
logrus.FieldKeyFunc: "Func",
logrus.FieldKeyFile: "File",
},
logrus.FieldKeyFunc: "Func",
logrus.FieldKeyFile: "File"},
//CallerPrettyfier: func(*runtime.Frame) (string, string) {},
PrettyPrint: false,
},
)
......@@ -430,6 +431,11 @@ func init() {
}
log.Hooks.Add(hook)
}
log.Infof("Now: '%s'", time.Now())
var cstZone = time.FixedZone("CST", 2*3600) // East 8 District
time.Local = cstZone
log.Infof("Now: '%s'", time.Now())
}
func LoadConfig() (Config, logrus.Logger) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment