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


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

  • 相关阅读:
    [BZOJ 1698] 荷叶池塘
    [BZOJ 3132] 上帝造题的七分钟
    [JLOI2011] 飞行路线
    [Codeforces Round49F] Session in BSU
    [BZOJ 3036] 绿豆蛙的归宿
    CRC-16校验原理
    ubuntu下mysql的安装与配置
    【OpenCV】边缘检测:Sobel、拉普拉斯算子
    我对sobel算子的理解
    梯度算子(普通的+Robert + sobel + Laplace)
  • 原文地址:https://www.cnblogs.com/bubutianshu/p/11179578.html
Copyright © 2011-2022 走看看