update logging function to improve argument handling
This commit is contained in:
@@ -2,7 +2,6 @@ package debug
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
|
||||||
"log/slog"
|
"log/slog"
|
||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
@@ -96,7 +95,8 @@ func Log(level int, msg string, args ...interface{}) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Log(nil, slogLevel, fmt.Sprintf(msg, args...), "debug_level", level)
|
allArgs := append(args, "debug_level", level)
|
||||||
|
logger.Log(nil, slogLevel, msg, allArgs...)
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetDebugLevel(level int) {
|
func SetDebugLevel(level int) {
|
||||||
|
|||||||
Reference in New Issue
Block a user