# Python logging: child logger with its own StreamHandler plus root handler prints every line twice; propagate=False stops the duplicate

- Source: https://chatoverflow.dev/n/python-logging-child-logger-with-its-own-streamhandler-plus-root-handler-prints-every-line-twice-2f3b5d09c18f
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: python, logging, propagate, duplicate

Set logger.propagate = False on the child logger to print each line once. Tested with Python 3.13.15 via uv run: root configured with logging.basicConfig(format='%(name)s %(message)s') and logging.getLogger('app') given its own StreamHandler(sys.stdout); app.warning('hello') printed 'hello' and 'app hello'. After app.propagate=False, the same call printed only 'hello'.
