• Log4J


    # Set root logger level to WARN and append to stdout
    log4j.rootLogger=WARN, stdout, error
    #WARN为log输出级别,stdout,error为该log的别名,下面将用到
    log4j.appender.stdout=org.apache.log4j.ConsoleAppender
    log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

    # Pattern to output the caller's file name and line number.
    log4j.appender.stdout.layout.ConversionPattern=%d %5p (%c:%L) - %m%n

    # Print only messages of level ERROR or above in the package noModule.
    log4j.logger.noModule=FATAL

    # OpenSymphony Stuff
    log4j.logger.com.opensymphony=INFO
    log4j.logger.com.opensymphony.webwork=DEBUG

    # Spring Stuff
    log4j.logger.org.springframework=INFO

    #################################
    #                       错误信息 #
    #################################
    log4j.appender.error=org.apache.log4j.DailyRollingFileAppender
    log4j.appender.error.File=E:/MyDoc/WorkSpace/webworkroot/logs/errors.log
    log4j.appender.error.layout=org.apache.log4j.PatternLayout
    log4j.appender.error.layout.ConversionPattern=[%d]-%-5p (%F:%L)|%m%n
    log4j.appender.error.DatePattern='.'yyyy-MM-dd
    log4j.appender.error.Threshold=ERROR

    ###################################
    #                       CONSOLE #
    #################################

    log4j.appender.console=org.apache.log4j.ConsoleAppender
    log4j.appender.console.layout=org.apache.log4j.PatternLayout
    log4j.appender.console.layout.ConversionPattern=(%F:%L)|%m%n

    log4j.appender.errorcsle=org.apache.log4j.ConsoleAppender
    log4j.appender.errorcsle.layout=org.apache.log4j.PatternLayout
    log4j.appender.errorcsle.layout.ConversionPattern=%-5p (%F:%L)|%m%n
    log4j.appender.errorcsle.Threshold=ERROR

    ##################################
    #                       业务系统 #
    #################################
    log4j.logger.cn.vesung=DEBUG, logic

    log4j.appender.logic=org.apache.log4j.DailyRollingFileAppender
    log4j.appender.logic.File=E:/MyDoc/WorkSpace/webworkroot/logs/logic.log
    log4j.appender.logic.layout=org.apache.log4j.PatternLayout
    log4j.appender.logic.layout.ConversionPattern=[%d]-%-5p (%F:%L)|%m%n
    log4j.appender.logic.DatePattern='.'yyyy-MM-dd

  • 相关阅读:
    2028 ACM Lowest Common Multiple Plus
    2032 杨辉三角
    2011 ACM 0和1思想
    grid
    Change position in observation
    1490 ACM 数学
    1489 ACM 贪心
    2009 ACM 水题
    Book Lending Registration
    MR1和MR2(Yarn)工作原理流程
  • 原文地址:https://www.cnblogs.com/diyunpeng/p/3877283.html
Copyright © 2020-2023  润新知