about summary refs log tree commit diff stats
path: root/log
diff options
context:
space:
mode:
authorAlan Pearce2024-12-03 13:48:32 +0100
committerAlan Pearce2024-12-03 13:48:32 +0100
commita29434dba11af39880ff73a7d434a3cb8c9a0f04 (patch)
treec81ba4ab4a9d8ac8d39b2fbca716116d9a7f0e54 /log
parent5465cb5315da8ed2f5ca64ceba14163c9fa7a975 (diff)
downloadx-main.tar.lz
x-main.tar.zst
x-main.zip
log: Disable timestamps correctly HEAD main
Diffstat (limited to 'log')
-rw-r--r--log/log.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/log/log.go b/log/log.go
index 63c6b23..053288a 100644
--- a/log/log.go
+++ b/log/log.go
@@ -82,12 +82,13 @@ func Configure(isProduction bool) *Logger {
 	var enc zapcore.Encoder
 	if isProduction {
 		cfg = zap.NewProductionEncoderConfig()
+		cfg.TimeKey = ""
 		enc = zaplogfmt.NewEncoder(cfg)
 	} else {
 		cfg = prettyconsole.NewEncoderConfig()
+		cfg.TimeKey = ""
 		enc = prettyconsole.NewEncoder(cfg)
 	}
-	cfg.TimeKey = ""
 	log := zap.New(
 		zapfilter.NewFilteringCore(zapcore.NewCore(enc, os.Stderr, zap.DebugLevel), filter),
 	)