Message273482
> 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. |
|
Date |
User |
Action |
Args |
2016-08-23 16:31:56 | vinay.sajip | set | recipients:
+ vinay.sajip, r.david.murray, docs@python, yasuiniko |
2016-08-23 16:31:56 | vinay.sajip | set | messageid: <1471969916.7.0.528090310472.issue27837@psf.upfronthosting.co.za> |
2016-08-23 16:31:56 | vinay.sajip | link | issue27837 messages |
2016-08-23 16:31:56 | vinay.sajip | create | |
|