fix: logger

This commit is contained in:
CaIon
2025-11-04 14:56:53 +08:00
parent 29e70acc55
commit a9a8676f7c

View File

@@ -67,8 +67,10 @@ func LogError(ctx context.Context, msg string) {
} }
func LogDebug(ctx context.Context, msg string, args ...any) { func LogDebug(ctx context.Context, msg string, args ...any) {
msg = fmt.Sprintf(msg, args...)
if common.DebugEnabled { if common.DebugEnabled {
if len(args) > 0 {
msg = fmt.Sprintf(msg, args...)
}
logHelper(ctx, loggerDebug, msg) logHelper(ctx, loggerDebug, msg)
} }
} }