From 45fb49db9722e33ab3036b03c549aec363d54a19 Mon Sep 17 00:00:00 2001 From: Tim Moreton Date: Tue, 30 Oct 2018 16:44:46 -0700 Subject: [PATCH] Match stackdriver fluentd logging format (#83) * Support geth logging to stdout and in JSON format * Tweak log level to match default fluentd format --- log/logger.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/log/logger.go b/log/logger.go index ca3e0b05996e..f131f7c89ba2 100644 --- a/log/logger.go +++ b/log/logger.go @@ -8,8 +8,8 @@ import ( "github.com/go-stack/stack" ) -const timeKey = "t" -const lvlKey = "lvl" +const timeKey = "timestamp" +const lvlKey = "severity" const msgKey = "msg" const ctxKey = "ctx" const errorKey = "LOG15_ERROR" @@ -50,17 +50,17 @@ func (l Lvl) AlignedString() string { func (l Lvl) String() string { switch l { case LvlTrace: - return "trce" + return "debug" case LvlDebug: - return "dbug" + return "debug" case LvlInfo: return "info" case LvlWarn: - return "warn" + return "warning" case LvlError: - return "eror" + return "error" case LvlCrit: - return "crit" + return "critical" default: panic("bad level") }