package cas

import (
	"log"
	"fmt"
)

const (
	_ = iota
	DEBUG
	INFO
	WARN
)

// Utility functions for logging messages
func logMessage(actualLogLevel, msgLogLevel, msg string, ) {
	if actualLogLevel <= msgLogLevel {
		log.Printf("[%s] %s", msgLogLevel, msg)
	}
}

// Utility function for logging message
func logMessagef(actualLogLevel, msgLogLevel, format string, msgArgs ...interface{}) {
	if actualLogLevel <= msgLogLevel {
		log.Printf("[%s] %s", msgLogLevel, fmt.Sprintf(format, msgArgs...))
	}
}


package cas

import (
	"log"
)

const (
	_ = iota
	DEBUG
	INFO
	WARN
)

// Utility functions for logging messages
func logMessage(actualLogLevel, msgLogLevel, msg string, ) {
	if actualLogLevel <= msgLogLevel {
		log.Printf("[%s] %s", msgLogLevel, msg)
	}
}

// Utility function for logging message
func logMessagef(actualLogLevel, msgLogLevel, format string, msgArgs...interface{} ) {
	if actualLogLevel <= msgLogLevel {
		log.Printf("[%s] " + format, msgLogLevel, msgArgs)
	}
}


--- 
+++ 
@@ -2,6 +2,7 @@
 
 import (
 	"log"
+	"fmt"
 )
 
 const (
@@ -19,9 +20,9 @@
 }
 
 // Utility function for logging message
-func logMessagef(actualLogLevel, msgLogLevel, format string, msgArgs...interface{} ) {
+func logMessagef(actualLogLevel, msgLogLevel, format string, msgArgs ...interface{}) {
 	if actualLogLevel <= msgLogLevel {
-		log.Printf("[%s] " + format, msgLogLevel, msgArgs)
+		log.Printf("[%s] %s", msgLogLevel, fmt.Sprintf(format, msgArgs...))
 	}
 }
 
Fix variadic function call for custom logger
