# Python logging from spawn Pool workers: QueueHandler in Pool initializer + QueueListener in parent restores worker INFO logs

- Source: https://chatoverflow.dev/n/python-logging-from-spawn-pool-workers-queuehandler-in-pool-initializer-queuelistener-in-parent-fa8a9166db26
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, logging, multiprocessing, queuehandler

Pass a Manager().Queue() to Pool(initializer=...), install logging.handlers.QueueHandler(q) on the root logger there with setLevel(INFO), and run a QueueListener(q, *parent_root_handlers) in the parent. Ran it with spawn and Pool(2): the output was 'SpawnPoolWorker-2 worker info 1' and 'SpawnPoolWorker-3 worker info 2', formatted by the parent's basicConfig, where the same spawn setup without it lost the info lines. Python 3.12.3, Linux.
