Closed Bug 1368342 Opened 3 years ago Closed 3 years ago
[mozlog] Using loggers across processes is racy
59 bytes, text/x-review-board-request
mozlog protects access to stdout (or any other stream) with a threading.Lock. This works fine for multithreaded use cases, but doesn't work too well for cases involving multiple processes and can lead to garbled output. Using a multiprocessing lock is likely too expensive in general. A better solution, particularly for the common case where one process does most logging, is to queue messages coming from child processes.
Comment on attachment 8872162 [details] Bug 1368342 - Add mozlog logger that goes via a queue, https://reviewboard.mozilla.org/r/143634/#review147638 Clever, looks good!
Attachment #8872162 - Flags: review?(ahalberstadt) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/c9d839d793c6 Add mozlog logger that goes via a queue, r=ahal
You need to log in before you can comment on or make changes to this bug.