Leo
Leo

Reputation: 509

Log4j not appending file extension

I've set my log4j.properties file to this configuration below

log4j.rootLogger=INFO, CATALINA

# Define all the appenders
log4j.appender.CATALINA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.CATALINA.File=${catalina.base}/logs/catalina.
log4j.appender.CATALINA.Append=true
log4j.appender.CATALINA.Encoding=UTF-8
# Roll-over the log once per day
log4j.appender.CATALINA.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.CATALINA.layout = org.apache.log4j.PatternLayout
log4j.appender.CATALINA.layout.ConversionPattern = %d [%t] %-5p %c- %m%n

The issue is when creating my logs (I'm using OS x Lion and Tomcat 6.0.32), the logs are created without the extension, just a final dot.

However, if I use this same configuration in a Windows box, it does the work OK.

Upvotes: 0

Views: 1398

Answers (1)

Jonathan S. Fisher
Jonathan S. Fisher

Reputation: 8837

log4j.appender.CATALINA.File=${catalina.base}/logs/catalina.

needs to be:

log4j.appender.CATALINA.File=${catalina.base}/logs/catalina.log

Upvotes: 4

Related Questions