zoukankan      html  css  js  c++  java
  • log日志的配置

    log日志的配置文件:

    注意:修改日志路径,如:

    args=('e:\AutoTestLog.log', 'a', 10*1024*1024, 5)
    args=('e:\AutoTestLog.log', 'a')

    Logger.conf文件

    ################################################
    ###########propagate 是否继承父类的log信息,0:否
    [loggers]
    keys=root,example01,example02
    [logger_root]
    level=DEBUG
    handlers=hand01,hand02
    [logger_example01]
    handlers=hand01,hand02
    qualname=example01
    propagate=0
    [logger_example02]
    handlers=hand01,hand03
    qualname=example02
    propagate=0
    ###############################################
    [handlers]
    keys=hand01,hand02,hand03
    [handler_hand01]
    class=StreamHandler
    level=DEBUG
    formatter=form01
    args=(sys.stderr,)
    [handler_hand02]
    class=FileHandler
    level=DEBUG
    formatter=form01
    args=('e:\AutoTestLog.log', 'a')
    [handler_hand03]
    class=handlers.RotatingFileHandler
    level=INFO
    formatter=form01
    args=('e:\AutoTestLog.log', 'a', 10*1024*1024, 5)
    ###############################################
    [formatters]
    keys=form01,form02
    [formatter_form01]
    format=%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s
    datefmt=%Y-%m-%d %H:%M:%S
    [formatter_form02]
    format=%(name)-12s: %(levelname)-8s %(message)s
    datefmt=%Y-%m-%d %H:%M:%S


    一切技术都是为业务服务,脱离业务的技术一文不值!

  • 相关阅读:
    DHCP 工作原理
    网络端口知识总结
    EAPOL 协议
    hostapd源代码分析(三):管理帧的收发和处理
    hostapd源代码分析(二):hostapd的工作机制
    hostapd源代码分析(一):网络接口和BSS的初始化
    Hostapd
    事件属性
    CSS颜色和长度单位
    弹性盒子FlexBox简介(一)
  • 原文地址:https://www.cnblogs.com/bubutianshu/p/11179578.html
Copyright © 2011-2022 走看看