Skip to content

Commit f6f7d23

Browse files
ysyneuclaude
andcommitted
fix: always strip slog time field — process manager provides timestamps
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1e2ece1 commit f6f7d23

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmd/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ func setupLogging(levelStr string) {
244244
level := parseLogLevel(levelStr)
245245
opts := &slog.HandlerOptions{
246246
Level: level,
247-
// Strip slog's time field when running under systemd/journald,
248-
// which already prepends its own timestamp to every line.
247+
// Strip slog's time field — the process manager (systemd/journald)
248+
// already prepends its own timestamp to every line.
249249
ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr {
250-
if a.Key == slog.TimeKey && os.Getenv("INVOCATION_ID") != "" {
250+
if a.Key == slog.TimeKey {
251251
return slog.Attr{}
252252
}
253253
return a

0 commit comments

Comments
 (0)