From 5f4d8e031e2ae6f3abb70e754aacf02c57ac84f0 Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Mon, 14 Jan 2019 23:10:13 +0400 Subject: [PATCH] [log] fix year format (#3125) Refs #3060 --- CHANGELOG_PENDING.md | 3 ++- libs/log/tmfmt_logger.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 8012832f2..0d3c4d6d3 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -7,7 +7,7 @@ Special thanks to external contributors on this release: ### BREAKING CHANGES: * CLI/RPC/Config -- [types] consistent field order of `CanonicalVote` and `CanonicalProposal` +- [types] consistent field order of `CanonicalVote` and `CanonicalProposal` * Apps @@ -23,3 +23,4 @@ Special thanks to external contributors on this release: ### IMPROVEMENTS: ### BUG FIXES: +- [log] \#3060 fix year format diff --git a/libs/log/tmfmt_logger.go b/libs/log/tmfmt_logger.go index 247ce8fc0..d841263ea 100644 --- a/libs/log/tmfmt_logger.go +++ b/libs/log/tmfmt_logger.go @@ -90,7 +90,7 @@ func (l tmfmtLogger) Log(keyvals ...interface{}) error { // D - first character of the level, uppercase (ASCII only) // [2016-05-02|11:06:44.322] - our time format (see https://golang.org/src/time/format.go) // Stopping ... - message - enc.buf.WriteString(fmt.Sprintf("%c[%s] %-44s ", lvl[0]-32, time.Now().Format("2016-01-02|15:04:05.000"), msg)) + enc.buf.WriteString(fmt.Sprintf("%c[%s] %-44s ", lvl[0]-32, time.Now().Format("2006-01-02|15:04:05.000"), msg)) if module != unknown { enc.buf.WriteString("module=" + module + " ")