logconfig.py 文件源码

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

项目:rpl-attacks 作者: dhondta 项目源码 文件源码
def set_logging(lvl='info'):
    global logger
    try:
        if not (isinstance(lvl, int) and lvl in LOG_LEVELS.values()):
            lvl = LOG_LEVELS[lvl]
    except KeyError:
        return False
    logging.basicConfig(format=LOG_FORMAT, level=lvl)
    if coloredlogs is not None:
        coloredlogs.install(lvl, fmt=LOG_FORMAT)
    if logger is not None:
        logger.setLevel(lvl)
    return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号