Skip to content

Commit 737d1b5

Browse files
logger: check isEnabledFor before calling handle()
1 parent f812de1 commit 737d1b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/borg/remote.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,8 @@ def handle_error(unpacked):
753753
if lr_dict is not None:
754754
# Re-emit remote log messages locally.
755755
_logger = logging.getLogger(lr_dict["name"])
756-
_logger.handle(logging.LogRecord(**lr_dict))
756+
if _logger.isEnabledFor(lr_dict["level"]):
757+
_logger.handle(logging.LogRecord(**lr_dict))
757758
continue
758759

759760
msgid = unpacked[MSGID]

0 commit comments

Comments
 (0)