Author steven.daprano
Recipients porton, steven.daprano, vinay.sajip
Date 2018-12-19.09:29:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The call to logging.error() is irrelevant, since there's no expectation that the module-level function will necessarily output the same as a method of a specific instance logger.error().

I agree that is it quite curious that the first call to logger.error outputs something different from the second.

The documentation says:

    The default format set by basicConfig() for messages is:
    severity:logger name:message

( Paragraph just above this: )

but you don't call basicConfig. I'm not sure that it is mandatory though.

It looks like a bug to *me*, but I'm not a logging expert. I'm seeing the same behaviour in 3.5 and 3.7, but in 2.7.1 the first call to logger.error prints an error message:

No handlers could be found for logger "main"
Date User Action Args
2018-12-19 09:29:12steven.dapranosetrecipients: + steven.daprano, vinay.sajip, porton
2018-12-19 09:29:11steven.dapranosetmessageid: <>
2018-12-19 09:29:11steven.dapranolinkissue35530 messages
2018-12-19 09:29:11steven.dapranocreate