From ec2e836aa3981349c03bab39f64daa924be63171 Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Mon, 20 Nov 2023 23:23:06 +0800 Subject: [PATCH] remove outdated code from logger --- log/logger.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/log/logger.go b/log/logger.go index b3f3b9fc5c..4ee69b2ae7 100644 --- a/log/logger.go +++ b/log/logger.go @@ -166,12 +166,6 @@ func (l *logger) write(level slog.Level, msg string, attrs ...any) { attrs = append(attrs, nil, errorKey, "Normalized odd number of arguments by adding nil") } - // TODO we will want to 'sanitize' record keys: - // e.g. an attr is provided with key name 'time' (conflicting with the built-in time key name). - // ReplaceAttr() has no way to differentiate between this provided attribute and Record.Time. - // To get around this, in the below loop, we can prefix the attr with a fixed string value, - // which then gets stripped from the handler before printing. - // evaluate lazy values var hadErr bool for i := 1; i < len(attrs); i += 2 {