Explain why we ignore the timestamp

Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
pull/30708/head
Benoit Tigeot 6 months ago
parent 3db7ebc591
commit 947658a96e
No known key found for this signature in database
GPG Key ID: 8E6D4FC8AEBDA62C

@ -59,6 +59,7 @@ func NewReadableTextLogger(output io.Writer, debugEnabled bool) Logger {
handler := slog.NewTextHandler(output, &slog.HandlerOptions{
Level: level,
// Ignore the time key to avoid cluttering the output with timestamps
ReplaceAttr: func(_ []string, a slog.Attr) slog.Attr {
if a.Key == slog.TimeKey {
return slog.Attr{}

Loading…
Cancel
Save