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 yasuiniko
Recipients docs@python, r.david.murray, vinay.sajip, yasuiniko
Date 2016-08-24.00:56:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1472000176.09.0.936157002072.issue27837@psf.upfronthosting.co.za>
In-reply-to
Content
I see, I didn't realize that the simpler code would break under certain conditions.

While there are definitely simpler examples in other documents, I haven't been able to find any indication that there is a simpler way to do multiprocessing and logging together, either on StackOverflow or the Python docs, other than by stumbling into it accidentally while writing code for this thread. 

Since multiprocessing in Python usually requires some extra work-arounds compared to single processing solutions, I searched specifically for multiprocessing logging options. I was also not surprised that I needed a queue, since multiprocessing is complicated. IMO the docs would be more clear if there was either a simpler example with a caveat that it wouldn't work in windows, or with a small paragraph saying that after 3.2, using logging as if it were on a single process would not cause problems.

Just to clarify, my understanding is that the child loggers on separate processes pass records to the main logger, which runs on the original process, which then handles the records and writes to a file. In this way there is no problem of simultaneously writing to the same file. Is the above correct for the code I wrote?

Thanks for your patience with my inexperience. It's been a long time since I've spent so much time on learning a new module, and I think improving the docs will help other people avoid spending so much time.
History
Date User Action Args
2016-08-24 00:56:16yasuinikosetrecipients: + yasuiniko, vinay.sajip, r.david.murray, docs@python
2016-08-24 00:56:16yasuinikosetmessageid: <1472000176.09.0.936157002072.issue27837@psf.upfronthosting.co.za>
2016-08-24 00:56:16yasuinikolinkissue27837 messages
2016-08-24 00:56:14yasuinikocreate