logger.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:bjarkan 作者: GetWellNetwork 项目源码 文件源码
def getLevel( self ):
        """
        A convenience wrapper around ``getEffectiveLevel()`` because the integer values for the
        various logging levels are clunky and probably don't mean anything to you.

        Returns:
            str: the name of the effective log level for this logging object, in lowercase
            (``"warning"``, ``"info"``, etc.)
        """
        level = self.getEffectiveLevel()
        if level == logging.CRITICAL:
            return 'critical'
        elif level == logging.ERROR:
            return 'error'
        elif level == logging.WARNING:
            return 'warning'
        elif level == logging.INFO:
            return 'info'
        elif level == logging.DEBUG:
            return 'debug'
        elif level == logging.NOTSET:
            return 'notset'
        else:
            return 'unknown ({})'.format( level )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号