-
Notifications
You must be signed in to change notification settings - Fork 17
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
get Traceback Information when use subprocesses #2
Comments
@bitranox |
To set up Python logging for subprocesses using a listener approach, you can use a logging configuration that allows each subprocess to send its log records to a listener running in the parent process. This is useful when you have multiple subprocesses and want them all to log in a coordinated way. Here’s how you can set up a multiprocessing-safe logging configuration: Step-by-Step Guide Listener in Parent Process: A QueueListener is set up in the parent process. It listens for log records that are sent from subprocesses via the log_queue. Subprocess Logging: In each subprocess, we configure the logger to use a QueueHandler that forwards log messages to the log_queue. These messages are handled by the listener in the parent process. QueueHandler: Used in each subprocess to send log records to a queue. |
get Traceback information when use_signals=False, possibly by using tblib
(see https://pypi.python.org/pypi/tblib)
What is the current behavior?
there is no Traceback Information when use_signals=False, because that cant be pickled from the process
just the Exception is raised
What is the motivation / use case for changing the behavior?
give correct traceback informaton for debugging
Please tell us about your environment:
ALL
The text was updated successfully, but these errors were encountered: