From 0e6d502573042a6563419fbcce4f284600bfe929 Mon Sep 17 00:00:00 2001 From: bshuster Date: Sun, 12 Mar 2017 07:54:48 +0200 Subject: [PATCH] Revert PR #17 (#23) --- logstash_formatter.go | 3 +-- logstash_test.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/logstash_formatter.go b/logstash_formatter.go index 7ae2cff..0ca0fc9 100644 --- a/logstash_formatter.go +++ b/logstash_formatter.go @@ -44,8 +44,7 @@ func (f *LogstashFormatter) FormatWithPrefix(entry *logrus.Entry, prefix string) timeStampFormat := f.TimestampFormat if timeStampFormat == "" { - //timeStampFormat = logrus.DefaultTimestampFormat - timeStampFormat = "2006-01-02 15:04:05.000" + timeStampFormat = logrus.DefaultTimestampFormat } fields["@timestamp"] = entry.Time.Format(timeStampFormat) diff --git a/logstash_test.go b/logstash_test.go index 54b15db..136a1bf 100644 --- a/logstash_test.go +++ b/logstash_test.go @@ -242,7 +242,7 @@ func TestFire(t *testing.T) { t.Error(err) } expected := map[string]string{ - "@timestamp": "0001-01-01 00:00:00.000", + "@timestamp": "0001-01-01T00:00:00Z", "@version": "1", "ignore": "haaa", "level": "debug",