[issue30520] loggers can't be pickled

Serhiy Storchaka report at bugs.python.org
Thu Jun 1 05:28:17 EDT 2017


Serhiy Storchaka added the comment:

The idea LGTM. But we should first check that the logger is accessible by the name: getLogger(self.name) is self. The same is done when pickling classes, functions, etc. It shouldn't be a surprise on unpickler side.

And maybe use not getLogger(), but different method which should fail if the logger doesn't exist rather than creating it. Otherwise this looks as pickling open files by name.

----------
nosy: +serhiy.storchaka
stage:  -> needs patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30520>
_______________________________________


More information about the Python-bugs-list mailing list