Log4j not printing out file and line number
Hi,
I am making a web application while learning JSP, tomcat and struts. I am using Log4j to do some logging but it is not working completely as expected. Here is my Log4j conf:
Code:
log4j.rootLogger=WARN, STDOUT, ROLLFILE
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.STDOUT.layout.ConversionPattern=[%d{yyyy-MMM-dd hh:mm}] %5p [%t] (%F\:%L) - %m%n
#
log4j.appender.ROLLFILE=org.apache.log4j.DailyRollingFileAppender
log4j.appender.ROLLFILE.File=/var/www/marlowe_dev/WEB-INF/logs/com.marlowe.log
log4j.appender.ROLLFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.ROLLFILE.layout.ConversionPattern=[%d{yyyy-MMM-dd hh:mm}] %5p [%t] (%F\:%L) - %m%n
log4j.appender.ROLLFILE.DatePattern='.'yyyy-MM-dd-a
log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=1
# main logger
log4j.logger.com.marlowe=DEBUG
I have logging in a Filter servlet and in a class. I put some logging in a method that is called when a URL is hit and that is called from my unit test from main. When I run the unit test, it logs perfectly. When I hit a URL and the logging runs it doesn't print out the file and line number. It prints out '?' where the file and line number should be. Is there a configuration setting in tomcat I need to set?
Thanks.