• log4j.properties


    ### set log levels ###
    log4j.rootLogger = INFO, stdout , D , E
    ### u8F93u51FAu5230u63A7u5236u53F0 ###
    log4j.appender.stdout = org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.Threshold = Debug 
    log4j.appender.stdout.Target = System.out
    log4j.appender.stdout.layout = org.apache.log4j.PatternLayout
    log4j.appender.stdout.layout.ConversionPattern = %d{ABSOLUTE} %5p %c{1}:%L - %m%n
    ### u8F93u51FAu5230u65E5u5FD7u6587u4EF6 ###
    log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
    log4j.appender.D.Encoding=UTF-8
    log4j.appender.D.File = ${LOG_DIR}/log/log.html
    ##log4j.appender.D.File = null/log/log.log
    log4j.appender.D.Append = true
    log4j.appender.D.Threshold = Debug 
    ## u8F93u51FADEBUGu7EA7u522Bu4EE5u4E0Au7684u65E5u5FD7 ##
    log4j.appender.D.layout = com.core.HtmlLogFormat 
    #log4j.appender.D.layout = org.apache.log4j.HTMLLayout
    ##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
    
    ### u4FDDu5B58u5F02u5E38u4FE1u606Fu5230u5355u72ECu6587u4EF6 ###
    log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
    log4j.appender.E.File = ${LOG_DIR}/log/error.log 
    ##log4j.appender.E.File = null/log/error.log
    ## u5F02u5E38u65E5u5FD7u6587u4EF6u540D ##
    log4j.appender.E.Append = true
    log4j.appender.E.Threshold = ERROR 
    ## u53EAu8F93u51FAERRORu7EA7u522Bu4EE5u4E0Au7684u65E5u5FD7!!! ##
    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 
  • 相关阅读:
    新一轮人工智能的兴起引发的思考
    企业应用架构的发展演进
    利用poi插件,把Excel内容读入Java,把Java中的内容输出到Exce
    mysql免安装被指
    正则表达式大全
    开发数据库步骤
    JVM
    Java面试题一
    java集合总结
    JAVA WEB回顾一
  • 原文地址:https://www.cnblogs.com/lgm1999/p/6233086.html
Copyright © 2020-2023  润新知