zoukankan      html  css  js  c++  java
  • log4j.properties

    log4j.rootCategory=info,CONSOLE,LOGFILE
    ### 设置###
    log4j.rootLogger = debug,stdout,D,E

    ### 输出信息到控制抬 ###
    log4j.appender.stdout = org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.Target = System.out
    log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
    log4j.appender.stdout.layout.ConversionPattern = [%-5p] %d{yyyy-MM-dd HH:mm:ss,SSS} method:%l%n%m%n

    ### 输出DEBUG 级别以上的日志到=E://logs/error.log ###
    log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
    ###需要自己修改日志文件位置
    log4j.appender.D.File = D://AsiaInfoWorkSpace/logs/log.log
    log4j.appender.D.Append = true
    log4j.appender.D.Threshold = DEBUG
    log4j.appender.D.layout = org.apache.log4j.PatternLayout
    log4j.appender.D.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n

    ### 输出ERROR 级别以上的日志到=E://logs/error.log ###
    log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
    log4j.appender.E.File =E://logs/error.log
    log4j.appender.E.Append = true
    log4j.appender.E.Threshold = ERROR
    log4j.appender.E.layout = org.apache.log4j.PatternLayout
    log4j.appender.E.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss} [ %t:%r ] - [ %p ] %m%n
  • 相关阅读:
    WebSocket简单通信
    python必会内置函数
    python装饰器
    Python常用模块1
    python函数操作
    python字典操作
    python切片操作
    python列表操作
    python字符串格式化的几种方式
    Jmeter响应中中文乱码怎么解决?
  • 原文地址:https://www.cnblogs.com/lovetl/p/11548253.html
Copyright © 2011-2022 走看看