This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vinay.sajip
Recipients ericg97477, vinay.sajip
Date 2015-07-25.21:03:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1437858210.46.0.710471463305.issue24717@psf.upfronthosting.co.za>
In-reply-to
Content
This is not a bug - it's how processes work on POSIX. Multiprocessing on POSIX generally uses the fork system call, which happens when you create a another process via the Process(...) call. At this point, the created process is a copy of the original process. When you add the handler *before* the Process(...) call, the copy also has the handler already added, so process_logger (which is called in the copy) will behave as expected. When you add the handler after the Process(...) call, the handler has not been added in the copy, so process_logger (which is called in the copy) will not behave as expected.

To avoid this sort of problem, ensure that logging is configured as desired in each process (normally, this means doing the logging configuration in code which is called (directly or indirectly) from the target=XXX callable which is passed to Process.
History
Date User Action Args
2015-07-25 21:03:30vinay.sajipsetrecipients: + vinay.sajip, ericg97477
2015-07-25 21:03:30vinay.sajipsetmessageid: <1437858210.46.0.710471463305.issue24717@psf.upfronthosting.co.za>
2015-07-25 21:03:30vinay.sajiplinkissue24717 messages
2015-07-25 21:03:30vinay.sajipcreate