Skip to content

Commit 078c30c

Browse files
committed
fix: check logger level when propagating logs
Signed-off-by: Frost Ming <[email protected]>
1 parent 3450311 commit 078c30c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Lib/logging/__init__.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,10 +1728,11 @@ def callHandlers(self, record):
17281728
c = self
17291729
found = 0
17301730
while c:
1731-
for hdlr in c.handlers:
1732-
found = found + 1
1733-
if record.levelno >= hdlr.level:
1734-
hdlr.handle(record)
1731+
if record.levelno >= c.level:
1732+
for hdlr in c.handlers:
1733+
found = found + 1
1734+
if record.levelno >= hdlr.level:
1735+
hdlr.handle(record)
17351736
if not c.propagate:
17361737
c = None #break out
17371738
else:

0 commit comments

Comments
 (0)