2 Replies Latest reply on Jul 31, 2007 9:58 AM by 807605

    The problem regarding log4j

    807605
      I would like to seperate the log4j file into two log files, one is for saving DEBUG message, another is for saving ERROR message, but the problem is while error message occurs, both the log will show the message. how can I force the error log only display in the error log file?

      This is my log4j properties file:
       
      log4j.rootCategory=DEBUG,auidtlog, errorlog
      log4j.appender.auidtlog=org.apache.log4j.RollingFileAppender
      log4j.appender.auidtlog.threshold=DEBUG
      log4j.appender.auidtlog.layout=org.apache.log4j.PatternLayout
      log4j.appender.auidtlog.MaxFileSize=1500KB
      log4j.appender.auidtlog.MaxBackupIndex=10
      log4j.appender.auidtlog.layout=org.apache.log4j.PatternLayout
      log4j.appender.auidtlog.layout.ConversionPattern=%d{DATE} [%-5p] [%c] (%F:%L) - %m%n
      log4j.appender.auidtlog.File=C:/Eclipse/workspace/WorkflowActiveReports/WebContent/log/ActiveReport_Audit.log
      
      log4j.appender.errorlog=org.apache.log4j.RollingFileAppender
      log4j.appender.errorlog.threshold=ERROR
      log4j.appender.errorlog.layout=org.apache.log4j.PatternLayout
      log4j.appender.errorlog.MaxFileSize=1500KB
      log4j.appender.errorlog.MaxBackupIndex=10
      log4j.appender.errorlog.layout.ConversionPattern=%d{DATE} [%-5p] [%c] (%F:%L) - %m%n
      log4j.appender.errorlog.File=C:/Eclipse/workspace/WorkflowActiveReports/WebContent/log/ActiveReport_Err.log
      Message was edited by:
      henry_22