Posted By:
Bindiya_Narayan
Posted On:
Tuesday, January 7, 2003 07:46 AM
Hello, I have a question on log4j.properties . Pls..Pls help me out... I want to log all debug statements to debug.txt all error messages to error.txt and all fatal error messages to fatal.txt. I have set up my property file as follows : # Turn log4j debugging on # log4j.debug = true ###################################### # Configure the log4j logging system ###################################### # Set the root output level and appenders log4j.rootCategory=, FileAppender1, FileAppender2 log4j.category.CustRequestExtractor.class=debug FileAppender1 log4j.category.CustRequestExtractor.class=ERROR FileAppender2 log4j.ap
More>>
Hello,
I have a question on log4j.properties . Pls..Pls help me out...
I want to log all debug statements to debug.txt all error messages to error.txt and all fatal error messages to fatal.txt. I have set up my property file as follows :
# Turn log4j debugging on
# log4j.debug = true
######################################
# Configure the log4j logging system
######################################
# Set the root output level and appenders
log4j.rootCategory=, FileAppender1, FileAppender2
log4j.category.CustRequestExtractor.class=debug FileAppender1
log4j.category.CustRequestExtractor.class=ERROR FileAppender2
log4j.appender.FileAppender1=org.apache.log4j.FileAppender
log4j.appender.FileAppender1.File=debug.txt
log4j.appender.FileAppender1.Threshold=debug,
log4j.appender.FileAppender1.layout=org.apache.log4j.PatternLayout
log4j.appender.FileAppender1.layout.ConversionPattern=%-5p [%t] %c-%m: %d{DATE}
log4j.appender.FileAppender2=org.apache.log4j.FileAppender
log4j.appender.FileAppender2.File=error.txt
log4j.appender.FileAppender2.Threshold=error
log4j.appender.FileAppender2.layout=org.apache.log4j.PatternLayout
log4j.appender.FileAppender2.layout.ConversionPattern=%-5p [%t] %c-%m: %d{DATE}
********************
I do get all errors logged to error.txt but my debug.txt contains debug + error messages.
Please help, I would really appreciate it.
thanks,
Bindiya
<<Less