diff --git a/logstash_formatter.go b/logstash_formatter.go index e1d277b..64bc5c3 100644 --- a/logstash_formatter.go +++ b/logstash_formatter.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "strings" + "time" "github.com/sirupsen/logrus" ) @@ -44,7 +45,7 @@ func (f *LogstashFormatter) FormatWithPrefix(entry *logrus.Entry, prefix string) timeStampFormat := f.TimestampFormat if timeStampFormat == "" { - timeStampFormat = logrus.DefaultTimestampFormat + timeStampFormat = time.RFC3339 } fields["@timestamp"] = entry.Time.Format(timeStampFormat)