I want to use the logger taglib from Jakarta which uses log4j. Does anyone have a sample log4j properties/initialization file that they would post so that I could take a look?

Dennis Tang


Taglib example in log-examples.war contains a sample log4j.properties file.
You should set up path variable similar to

TOMCAT_OPTS=-Dlog4j.configuration=file:/c:/jakarta-tomcat-3.2.1/webapps/log-examples/WEB-INF/classes/log4j.properties

# Sample properties to initialise log4j
#log4j.rootCategory=debug, stdout, R
log4j.rootCategory=debug, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

Sample file as follows:
# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=logtags.log

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=2

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact