Skip to content

Commit b700357

Browse files
committed
Update logger
1 parent a8ca5e4 commit b700357

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

logger.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func replacer(groups []string, a slog.Attr) slog.Attr {
5353
// Rename attribute keys to match Cloud Logging structured log format
5454
switch a.Key {
5555
case slog.LevelKey:
56-
a.Key = "severity"
56+
a.Key = "level"
5757
// Map slog.Level string values to Cloud Logging LogSeverity
5858
// https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogSeverity
5959
if level := a.Value.Any().(slog.Level); level == slog.LevelWarn {
@@ -62,7 +62,7 @@ func replacer(groups []string, a slog.Attr) slog.Attr {
6262
case slog.TimeKey:
6363
a.Key = "timestamp"
6464
case slog.MessageKey:
65-
a.Key = "message"
65+
a.Key = "msg"
6666
}
6767
return a
6868
}

0 commit comments

Comments
 (0)