almar.py 文件源码

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

项目:almar 作者: scriptotek 项目源码 文件源码
def configure_logging(config):
    logging.config.dictConfig(config)

    # By default the install() function installs a handler on the root logger,
    # this means that log messages from your code and log messages from the
    # libraries that you use will all show up on the terminal.
    coloredlogs.install(level=logging.DEBUG,
                        fmt='%(asctime)s %(levelname)-8s %(message)s',
                        datefmt='%Y-%m-%d %H:%I:%S')

    logging.getLogger('requests').setLevel(logging.WARNING)
    logging.getLogger('urllib3.connectionpool').setLevel(logging.WARNING)

    if sys.stdout.isatty():
        colorama.init(autoreset=True)
    else:
        # We're being piped, so skip colors
        colorama.init(strip=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号