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 pitrou
Recipients pitrou, serhiy.storchaka, vinay.sajip
Date 2017-06-01.09:38:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
Le 01/06/2017 à 11:28, Serhiy Storchaka a écrit :
> The idea LGTM. But we should first check that the logger is accessible by the name: getLogger( is self. The same is done when pickling classes, functions, etc. It shouldn't be a surprise on unpickler side.

Good idea.

> And maybe use not getLogger(), but different method which should fail if the logger doesn't exist rather than creating it.

I disagree. The fact that it creates a new logger if it doesn't exist is
pretty much by design.  Typically, if you have:

class MyObject:
    def __init__(self):
        self.logger = getLogger('myobject')

then unpickling the first MyObject instance in a new process should also
create the 'myobject' logger instead of failing.
Date User Action Args
2017-06-01 09:38:45pitrousetrecipients: + pitrou, vinay.sajip, serhiy.storchaka
2017-06-01 09:38:45pitroulinkissue30520 messages
2017-06-01 09:38:45pitroucreate