Skip to content

Commit 1161c8b

Browse files
rogercollflorianl
andauthored
Update internal/global/logging.go
Co-authored-by: Florian Lehner <[email protected]>
1 parent 2facbb6 commit 1161c8b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/global/logging.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ func Error(msg error) {
6363
// This wrapper converts structured log data into a string message for
6464
// backward compatibility with older unstructured logs.
6565
func Debugf(msg string, keysAndValues ...any) {
66+
if !GetLogger().Enabled(context.Background(), slog.LevelDebug) {
67+
return
68+
}
6669
GetLogger().Debug(fmt.Sprintf(msg, keysAndValues...))
6770
}
6871

0 commit comments

Comments
 (0)