Author vinay.sajip
Recipients pitrou, vinay.sajip
Date 2017-06-01.07:14:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496301247.13.0.287758895999.issue30520@psf.upfronthosting.co.za>
In-reply-to
Content
I am not sure it is a good idea to support pickling of loggers, as they are singletons and generally aren't supposed to be instantiated other than by calling logging.getLogger(name). What's the use case for pickling them, giving that (as you say) just the name could be used? In general, it's not needed to have loggers as part of an object instance, so I don't quite see where the need to pickle comes from.

One could implement __getstate__() to just return the name, but there is no corresponding obvious implementation of __setstate__() because loggers aren't meant to be instantiated via unpickling.
History
Date User Action Args
2017-06-01 07:14:07vinay.sajipsetrecipients: + vinay.sajip, pitrou
2017-06-01 07:14:07vinay.sajipsetmessageid: <1496301247.13.0.287758895999.issue30520@psf.upfronthosting.co.za>
2017-06-01 07:14:07vinay.sajiplinkissue30520 messages
2017-06-01 07:14:06vinay.sajipcreate