Update module github.com/bshuster-repo/logrus-logstash-hook to v1.1.0
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
github.com/bshuster-repo/logrus-logstash-hook | require | minor |
v1.0.2 -> v1.1.0
|
Release Notes
bshuster-repo/logrus-logstash-hook
v1.1.0
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)
Configuration
-
If you want to rebase/retry this MR, click this checkbox.
This MR has been generated by Renovate Bot.