Message149200
You shouldn't need to pickle loggers, because loggers just represent where in your application something happens (that being determined by the logger name). The logger name is just a string, and if you need to communicate that across e.g. a process boundary, just sending the name should be enough.
Ideally in a multiprocessing application, logging initialisation should happen after the fork() or CreateProcess() which creates the child process. It's best if loggers are named after the module which logs events (using __name__, which means you don't need to pass the name around - but even if you need to for some reason, you still don't need to pickle a logger or pass it around as a parameter).
You *can* use logging safely in terms of the locks it creates to serialise access to I/O resources and to protect shared data structures, but you still need to understand what's happening and allow for it in your own coding.
To summarise, I don't quite see from the information in this issue why it is desirable to pickle loggers, and the GitHub link doesn't work, so I can't look at Nikita's example, either. So if a better justification isn't available, I would like to close the issue. |
|
Date |
User |
Action |
Args |
2011-12-10 23:52:24 | vinay.sajip | set | recipients:
+ vinay.sajip, pitrou, jango |
2011-12-10 23:52:24 | vinay.sajip | set | messageid: <1323561144.62.0.432430357626.issue13569@psf.upfronthosting.co.za> |
2011-12-10 23:52:24 | vinay.sajip | link | issue13569 messages |
2011-12-10 23:52:23 | vinay.sajip | create | |
|