From fc8725bdd02e8d7799e0fea397fe2e6e21c63a5d Mon Sep 17 00:00:00 2001 From: Jean Mertz Date: Mon, 28 Oct 2019 09:54:24 +0100 Subject: [PATCH] use "timestamp" key instead of "time" This is in accordance with the StackDriver documentation: https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry fixes #15 --- encoder.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encoder.go b/encoder.go index fb10b7d..eec571f 100644 --- a/encoder.go +++ b/encoder.go @@ -33,7 +33,7 @@ var logLevelSeverity = map[zapcore.Level]string{ // encoderConfig is the default encoder configuration, slightly tweaked to use // the correct fields for Stackdriver to parse them. var encoderConfig = zapcore.EncoderConfig{ - TimeKey: "time", + TimeKey: "timestamp", LevelKey: "severity", NameKey: "logger", CallerKey: "caller",