Move to RFC3339Nano
as the default timestamp format in the logstash
JSON.
In case you want to use RFC3339 (the old one) set the formatter in the following way:
logstashFieldMap := logrus.Fields{"@version": "1", "type": "log"}
fields := logrus.FieldMap{
logrus.FieldKeyTime: "@timestamp",
logrus.FieldKeyMsg: "message",
}
logstashFmt := LogstashFormatter{
Formatter: &logrus.JSONFormatter{
FieldMap: logstashFieldMap,
TimestampFormat: time.RFC3339,
},
Fields: fields,
}
logrustashHook := logrustash.New(conn, logstashFmt)