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 docs@python, r.david.murray, vinay.sajip, yasuiniko
Date 2016-08-23.16:31:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471969916.7.0.528090310472.issue27837@psf.upfronthosting.co.za>
In-reply-to
Content
> Since a queue isn't necessary for logging with multiprocessing

IMO a queue with QueueHandler/QueueListener is best practice when working with multiprocessing and logging. If you don't use them, things may seem to work some of the time but could fail in certain scenarios. For example, multiprocessing works differently on different platforms such as POSIX and Windows, which can lead to problems with simpler approaches.

There are plenty of simpler examples in the logging tutorial and cookbook, which might be worth reviewing first if you are new to logging in Python.

See this post for a discussion on using logging with multiprocessing:

https://plumberjack.blogspot.co.uk/2010/09/using-logging-with-multiprocessing.html

This was the original source of the example in the cookbook.
History
Date User Action Args
2016-08-23 16:31:56vinay.sajipsetrecipients: + vinay.sajip, r.david.murray, docs@python, yasuiniko
2016-08-23 16:31:56vinay.sajipsetmessageid: <1471969916.7.0.528090310472.issue27837@psf.upfronthosting.co.za>
2016-08-23 16:31:56vinay.sajiplinkissue27837 messages
2016-08-23 16:31:56vinay.sajipcreate