We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e2ece1 commit f6f7d23Copy full SHA for f6f7d23
1 file changed
cmd/main.go
@@ -244,10 +244,10 @@ func setupLogging(levelStr string) {
244
level := parseLogLevel(levelStr)
245
opts := &slog.HandlerOptions{
246
Level: level,
247
- // Strip slog's time field when running under systemd/journald,
248
- // which already prepends its own timestamp to every line.
+ // Strip slog's time field — the process manager (systemd/journald)
+ // already prepends its own timestamp to every line.
249
ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr {
250
- if a.Key == slog.TimeKey && os.Getenv("INVOCATION_ID") != "" {
+ if a.Key == slog.TimeKey {
251
return slog.Attr{}
252
}
253
return a
0 commit comments