Minor fixes in ccLogger

This commit is contained in:
Thomas Roehl 2022-01-30 14:29:25 +01:00
parent 7316de2813
commit 4541e50bea

View File

@ -38,7 +38,7 @@ func initLogger() {
func Print(e ...interface{}) { func Print(e ...interface{}) {
initLogger() initLogger()
defaultLog.Print(e) defaultLog.Print(e...)
} }
func ComponentPrint(component string, e ...interface{}) { func ComponentPrint(component string, e ...interface{}) {
@ -48,7 +48,7 @@ func ComponentPrint(component string, e ...interface{}) {
func Info(e ...interface{}) { func Info(e ...interface{}) {
initLogger() initLogger()
infoLog.Print(e) infoLog.Print(e...)
} }
func ComponentInfo(component string, e ...interface{}) { func ComponentInfo(component string, e ...interface{}) {
@ -58,14 +58,14 @@ func ComponentInfo(component string, e ...interface{}) {
func Debug(e ...interface{}) { func Debug(e ...interface{}) {
initLogger() initLogger()
if globalDebug == true { if globalDebug {
debugLog.Print(e) debugLog.Print(e...)
} }
} }
func ComponentDebug(component string, e ...interface{}) { func ComponentDebug(component string, e ...interface{}) {
initLogger() initLogger()
if globalDebug == true && debugLog != nil { if globalDebug && debugLog != nil {
//CCComponentPrint(debugLog, component, e) //CCComponentPrint(debugLog, component, e)
debugLog.Print(fmt.Sprintf("[%s] ", component), e) debugLog.Print(fmt.Sprintf("[%s] ", component), e)
} }