1 Commits

Author SHA1 Message Date
Adrian Zürcher
40099fffc6 fix .log ending for empty parameter in linux systems 2026-01-18 21:42:36 +01:00

View File

@@ -35,7 +35,11 @@ func NewLogger(file string, cfg *Config) (*Logger, error) {
if file == "" {
file = os.Args[0]
if filepath.Ext(file) != "" {
file = strings.Replace(filepath.Base(file), filepath.Ext(file), ".log", 1)
} else {
file = filepath.Base(file) + ".log"
}
}
encoderConfig := zap.NewProductionEncoderConfig()