mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-08 08:32:16 +01:00
fix(logging): correctly map GCP structured log keys (#1159)
* fix: correctly map GCP structured log keys * Update pkg/modules/logging/logging.go Co-authored-by: Julien Neuhart <neuhart.julien@gmail.com> --------- Co-authored-by: Julien Neuhart <neuhart.julien@gmail.com>
This commit is contained in:
@@ -198,6 +198,12 @@ func newLogEncoder(format string, gcpSeverity bool) (zapcore.Encoder, error) {
|
||||
|
||||
if gcpSeverity {
|
||||
encCfg.EncodeLevel = gcpSeverityEncoder
|
||||
// Those only make sense in JSON.
|
||||
encCfg.TimeKey = "time"
|
||||
encCfg.LevelKey = "severity"
|
||||
encCfg.MessageKey = "message"
|
||||
encCfg.EncodeTime = zapcore.ISO8601TimeEncoder
|
||||
encCfg.EncodeDuration = zapcore.MillisDurationEncoder
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user