runner.py 文件源码

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

项目:SlackJira 作者: Rastii 项目源码 文件源码
def _logging_config(config_parser, disable_existing_loggers=False):
    """
    Helper that allows us to use an existing ConfigParser object to load logging
    configurations instead of a filename.

    Note: this code is essentially copy pasta from `logging.config.fileConfig` except
    we skip loading the file.
    """
    formatters = logging.config._create_formatters(config_parser)

    # critical section
    logging._acquireLock()
    try:
        logging._handlers.clear()
        del logging._handlerList[:]
        # Handlers add themselves to logging._handlers
        handlers = logging.config._install_handlers(config_parser, formatters)
        logging.config._install_loggers(config_parser, handlers, disable_existing_loggers)
    finally:
        logging._releaseLock()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号