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 vinay.sajip
Recipients jango, pitrou, vinay.sajip
Date 2011-12-10.23:52:23
SpamBayes Score 2.7755576e-15
Marked as misclassified No
Message-id <1323561144.62.0.432430357626.issue13569@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-12-10 23:52:24vinay.sajipsetrecipients: + vinay.sajip, pitrou, jango
2011-12-10 23:52:24vinay.sajipsetmessageid: <1323561144.62.0.432430357626.issue13569@psf.upfronthosting.co.za>
2011-12-10 23:52:24vinay.sajiplinkissue13569 messages
2011-12-10 23:52:23vinay.sajipcreate