From 40099fffc60ed0949e01c6e1d4268a44b56f0178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Z=C3=BCrcher?= Date: Sun, 18 Jan 2026 21:42:36 +0100 Subject: [PATCH] fix .log ending for empty parameter in linux systems --- logging/logging.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/logging/logging.go b/logging/logging.go index 416866d..33487f6 100644 --- a/logging/logging.go +++ b/logging/logging.go @@ -35,7 +35,11 @@ func NewLogger(file string, cfg *Config) (*Logger, error) { if file == "" { file = os.Args[0] - file = strings.Replace(filepath.Base(file), filepath.Ext(file), ".log", 1) + if filepath.Ext(file) != "" { + file = strings.Replace(filepath.Base(file), filepath.Ext(file), ".log", 1) + } else { + file = filepath.Base(file) + ".log" + } } encoderConfig := zap.NewProductionEncoderConfig()