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 pakal
Recipients georg.brandl, pakal
Date 2010-03-17.10:06:28
SpamBayes Score 1.0444978e-12
Marked as misclassified No
Message-id <1268820396.69.0.459147398559.issue8162@psf.upfronthosting.co.za>
In-reply-to
Content
Hello

I see some trouble in the semantic of logging.disable(lvl) :
according to the doc (and docstrings), it's the same as a logger.setLevel(lvl) called on all logger, but in reality it doesn't act the same way : when we call logger.setLevel(lvl), log messages at level lvl WILL be logged, whereas with logger.disable(lvl), they will NOT be logged (CF method below from logging/__init__.py).

So maybe the best would be to explain that disable() also disable the target level itself, and to set by default this disabling level to -1 (and not 0 as currently), so that by default ALL messages get loged, even those set to level 0.

    def isEnabledFor(self, level):
        """
        Is this logger enabled for level 'level'?
        """
        if self.manager.disable >= level:
            return 0
        return level >= self.getEffectiveLevel()
History
Date User Action Args
2010-03-17 10:06:37pakalsetrecipients: + pakal, georg.brandl
2010-03-17 10:06:36pakalsetmessageid: <1268820396.69.0.459147398559.issue8162@psf.upfronthosting.co.za>
2010-03-17 10:06:29pakallinkissue8162 messages
2010-03-17 10:06:28pakalcreate