0

Hi,
Im trying to use log4j with tomcat. Im developing in eclipse. It seems to be ignoring my properties file and going all messages get logged to the console. This is my properties file:

log4j.rootLogger=DEBUG, A4

log4j.appender.A4=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A4.File=c:/ccLogs/ccLog.log
# Roll the log file at a certain time
log4j.appender.A4.DatePattern='.'yyyy-MM-dd-HH-mm
# Append to the end of the file or overwrites the file at start.
log4j.appender.A4.Append=true
log4j.appender.A4.layout=org.apache.log4j.PatternLayout
log4j.appender.A4.layout.ConversionPattern=[%5p] %d{mm:ss} (%F:%M:%L)%n%m%n%n

The class that calls it is in WEB-INF/src/utilities
Ive tried placing the properties file in WEB-INF/src/utilities and WEB-INF/src but it can never find it. Ive tried removing it altogether and it makes no difference (leading me to believe it is never loaded properly)

In my class I instansiate my logging class like this:

static Logger log = Logger.getLogger("myclassname");
2
Contributors
1
Reply
2
Views
11 Years
Discussion Span
Last Post by jwenting
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.