Fix variadic parameter handling in logger functions for consistency and correctness

This commit is contained in:
Achim Rohn
2026-01-15 22:58:41 +01:00
parent 125b8679a0
commit c4e75c05d3
2 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -21,10 +21,10 @@ func PrintLogDebug(message string, a ...any) {
func Debug(a ...any) {
if ErstellerLogger == nil {
PrintDebug(a)
PrintDebug(a...)
return
}
ErstellerLogger.Debug(a)
ErstellerLogger.Debug(a...)
}
func PrintDebug(a ...any) {
@@ -56,12 +56,12 @@ func PrintLogError(message string, a []any) {
func Error(a ...any) {
if ErstellerLogger == nil {
PrintError(a)
PrintError(a...)
return
}
ErstellerLogger.Error(a)
ErstellerLogger.Error(a...)
}
func PrintError(a []any) {
func PrintError(a ...any) {
println(fmt.Sprint("Error: ", joinStrings(a)))
}
+2 -2
View File
@@ -77,7 +77,7 @@ func (l *LoggerImpl) Debug(a ...any) {
return
}
if l.logToStdout {
PrintDebug(a)
PrintDebug(a...)
}
// Use OpenTelemetry logger
@@ -103,7 +103,7 @@ func (l *LoggerImpl) Error(a ...any) {
}
if l.logToStdout {
PrintError(a)
PrintError(a...)
}
// Use OpenTelemetry logger