cli.py 文件源码

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

项目:pingparsing 作者: thombashi 项目源码 文件源码
def initialize_log_handler(log_level):
    debug_format_str = (
        "[{record.level_name}] {record.channel} {record.func_name} "
        "({record.lineno}): {record.message}")
    if log_level == logbook.DEBUG:
        info_format_str = debug_format_str
    else:
        info_format_str = (
            "[{record.level_name}] {record.channel}: {record.message}")

    logbook.StderrHandler(
        level=logbook.DEBUG, format_string=debug_format_str
    ).push_application()
    logbook.StderrHandler(
        level=logbook.INFO, format_string=info_format_str
    ).push_application()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号