slogging.py 文件源码

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

项目:pyethereum 作者: ethereumproject 项目源码 文件源码
def get_configuration():
    """
    get a configuration (snapshot) that can be used to call configure
    snapshot = get_configuration()
    configure(**snapshot)
    """
    root = getLogger()
    name_levels = [('', logging.getLevelName(root.level))]
    name_levels.extend(
        (name, logging.getLevelName(logger.level))
        for name, logger
        in root.manager.loggerDict.items()
        if hasattr(logger, 'level')
    )

    config_string = ','.join('%s:%s' % x for x in name_levels)

    return dict(config_string=config_string, log_json=SLogger.manager.log_json)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号