logging.py 文件源码

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

项目:bonobo 作者: python-bonobo 项目源码 文件源码
def filter(self, record):
        record.spent = record.relativeCreated // 1000
        if iswindows:
            record.fg = ''
        elif record.levelname == 'DEBG':
            record.fg = Fore.LIGHTBLACK_EX
        elif record.levelname == 'INFO':
            record.fg = Fore.LIGHTWHITE_EX
        elif record.levelname == 'WARN':
            record.fg = Fore.LIGHTYELLOW_EX
        elif record.levelname == 'ERR ':
            record.fg = Fore.LIGHTRED_EX
        elif record.levelname == 'CRIT':
            record.fg = Fore.RED
        else:
            record.fg = Fore.LIGHTWHITE_EX
        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号