feat: rely on system to show log times in production
Alan Pearce alan@alanpearce.eu
Tue, 14 May 2024 07:57:48 +0200
1 files changed, 5 insertions(+), 1 deletions(-)
jump to
M searchix.go → searchix.go
@@ -51,7 +51,11 @@ if err != nil { log.Panicf("error parsing configuration file: %v", err) } slog.SetLogLoggerLevel(conf.LogLevel) - log.SetFlags(log.LstdFlags | log.Lmsgprefix) + if conf.Web.Environment == "production" { + log.SetFlags(log.Lmsgprefix) + } else { + log.SetFlags(log.LstdFlags | log.Lmsgprefix) + } log.SetPrefix("searchix: ") read, write, exists, err := index.OpenOrCreate(conf.DataPath, *replace)