Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiprocessing workers use default handler #160

Closed
danmou opened this issue Oct 26, 2019 · 1 comment
Closed

Multiprocessing workers use default handler #160

danmou opened this issue Oct 26, 2019 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@danmou
Copy link

danmou commented Oct 26, 2019

My program configures loguru to log to some files with a custom format string. However, when I log from inside a multiprocessing.Process, it only uses the loguru default stderr handler. How can I fix this?

@Delgan
Copy link
Owner

Delgan commented Oct 26, 2019

Yeah, this is a known problem with multiprocessing on Windows... Fortunately, this has been finally fixed a few days ago!

This is discussed in #108. Please, read the new documentation entry to better understand what will be the workaround and why it should be done like this: Compatibility with multiprocessing using enqueue argument

The changes are not yet usable, they are only effective on the loguru development version. You will have to wait for the next version (v0.4.0) before being able to fully enjoy logging with multiprocessing. Hopefully, it should be published in the next week or so.

@danmou danmou closed this as completed Oct 26, 2019
@Delgan Delgan added the duplicate This issue or pull request already exists label Oct 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants