Author arturoescaip
Recipients arturoescaip
Date 2020-05-24.18:02:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1590343358.29.0.207811312221.issue40756@roundup.psfhosted.org>
In-reply-to
Content
The 'extra' argument is not always used by custom logger adapters. There
example:

class IndentAdapter(logging.LoggerAdapter):
    def process(self, msg, kwargs):
        indent = kwargs.pop(indent, 1)
        return ' ' * indent + msg, kwargs

It is cleaner and friendlier to default the 'extra' argument to None
instead of either forcing the subclasses of LoggerAdapter to pass a None
value directly or to override the constructor.
History
Date User Action Args
2020-05-24 18:02:38arturoescaipsetrecipients: + arturoescaip
2020-05-24 18:02:38arturoescaipsetmessageid: <1590343358.29.0.207811312221.issue40756@roundup.psfhosted.org>
2020-05-24 18:02:38arturoescaiplinkissue40756 messages
2020-05-24 18:02:38arturoescaipcreate