Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit 4877553

Browse files
committed
Only propagate logs included in config
1 parent c396a35 commit 4877553

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ethereum/slogging.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,16 @@ def configure(config_string=None, log_json=False, log_file=None):
312312
if hasattr(logger, 'setLevel'):
313313
# Guard against `logging.PlaceHolder` instances
314314
logger.setLevel(logging.NOTSET)
315-
logger.propagate = True
315+
if config_string == ":{}".format(DEFAULT_LOGLEVEL):
316+
logger.propagate = True
317+
else:
318+
logger.propagate = False
316319

317320
for name_levels in config_string.split(','):
318321
name, _, level = name_levels.partition(':')
319322
logger = getLogger(name)
320323
logger.setLevel(level.upper())
324+
logger.propagate = True
321325

322326
configure_logging = configure
323327

0 commit comments

Comments
 (0)