2 Commits

Author SHA1 Message Date
root b53f0a09b2 change to local domain 2026-04-20 11:28:00 +00:00
Adrian Zürcher 40099fffc6 fix .log ending for empty parameter in linux systems 2026-01-18 21:42:36 +01:00
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
module gitea.tecamino.com/paadi/tecamino-logger module gitea.tecamino.local/paadi/tecamino-logger
go 1.21.0 go 1.21.0
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"os" "os"
"testing" "testing"
"gitea.tecamino.com/paadi/tecamino-logger/logging" "gitea.tecamino.local/paadi/tecamino-logger/logging"
) )
func TestLogger(t *testing.T) { func TestLogger(t *testing.T) {
+5 -1
View File
@@ -35,7 +35,11 @@ func NewLogger(file string, cfg *Config) (*Logger, error) {
if file == "" { if file == "" {
file = os.Args[0] 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() encoderConfig := zap.NewProductionEncoderConfig()