diff --git a/logger.go b/logger.go index 2b44ff8..66f24a4 100644 --- a/logger.go +++ b/logger.go @@ -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))) } diff --git a/open_telemetry_logger.go b/open_telemetry_logger.go index 8794219..c00acd5 100644 --- a/open_telemetry_logger.go +++ b/open_telemetry_logger.go @@ -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