I am administrating an web application that was not wrote by me,
Recently our team has decided to run the application on another server to make it more stable when user needs it.
The daily rolling function is not working on the new server, while it does in the old one
Here is the log4j.properties file:
log4j.rootCategory=DEBUG, stdout, DailyRolling
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
#
Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p [%t] %-2C{1}.%M(%L) | %m%n
log4j.appender.DailyRolling = org.apache.log4j.rolling.RollingFileAppender
log4j.appender.DailyRolling.File = ${catalina.home}/cdcpd-logs/cdcpd-trace.log
log4j.appender.DailyRolling.Append = true
log4j.appender.DailyRolling.rollingPolicy = org.apache.log4j.rolling.TimeBasedRollingPolicy
log4j.appender.DailyRolling.rollingPolicy.FileNamePattern = ${catalina.home}/cdcpd-logs/cdcpd-trace.%d{yyyy-MM-dd}.log
log4j.appender.DailyRolling.layout = org.apache.log4j.PatternLayout
log4j.appender.DailyRolling.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} %-23c{1} - %-5p - %-2m%n
I tried to add -Dlog4j.debug into catalina.sh below is the debug message I got
log4j: Using URL [file:/cdcpd/apache-tomcat-7.0.53/webapps/cdcpd/WEB-INF/classes/log4j.properties] for automatic log4j configuration.
log4j: Reading configuration from URL file:/cdcpd/apache-tomcat-7.0.53/webapps/cdcpd/WEB-INF/classes/log4j.properties
log4j: Parsing for [root] with value=[DEBUG, stdout, DailyRolling].
log4j: Level token is [DEBUG].
log4j: Category root set to DEBUG
log4j: Parsing appender named "stdout".
log4j: Parsing layout options for "stdout".
log4j: Setting property [conversionPattern] to [%d{yyyy-MM-dd HH:mm:ss} %-5p [%t] %-2C{1}.%M(%L) | %m%n].
log4j: End of parsing for "stdout".
log4j: Parsed "stdout" options.
log4j: Parsing appender named "DailyRolling".
log4j: Parsing layout options for "DailyRolling".
log4j: Setting property [conversionPattern] to [%d{yyyy-MM-dd HH:mm:ss} %-23c{1} - %-5p - %-2m%n].
log4j: End of parsing for "DailyRolling".
log4j: Setting property [file] to [/cdcpd/apache-tomcat-7.0.53/cdcpd-logs/cdcpd-trace.log].
log4j: Setting property [fileNamePattern] to [/cdcpd/apache-tomcat-7.0.53/cdcpd-logs/cdcpd-trace.%d{yyyy-MM-dd}.log].
log4j: Setting property [append] to [true].
log4j: setFile called: /cdcpd/apache-tomcat-7.0.53/cdcpd-logs/cdcpd-trace.log, true
log4j: setFile ended
log4j: Parsed "DailyRolling" options.
log4j: Finished configuring.
log4j: Reading configuration from URL jndi:/localhost/cdcpd/WEB-INF/classes/log4j.properties
log4j: Parsing for [root] with value=[DEBUG, stdout, DailyRolling].
log4j: Level token is [DEBUG].
log4j: Category root set to DEBUG
log4j: Parsing appender named "stdout".
log4j: Parsing layout options for "stdout".
log4j: Setting property [conversionPattern] to [%d{yyyy-MM-dd HH:mm:ss} %-5p [%t] %-2C{1}.%M(%L) | %m%n].
log4j: End of parsing for "stdout".
log4j: Parsed "stdout" options.
log4j: Parsing appender named "DailyRolling".
log4j: Parsing layout options for "DailyRolling".
log4j: Setting property [conversionPattern] to [%d{yyyy-MM-dd HH:mm:ss} %-23c{1} - %-5p - %-2m%n].
log4j: End of parsing for "DailyRolling".
log4j: Setting property [file] to [/cdcpd/apache-tomcat-7.0.53/cdcpd-logs/cdcpd-trace.log].
log4j: Setting property [fileNamePattern] to [/cdcpd/apache-tomcat-7.0.53/cdcpd-logs/cdcpd-trace.%d{yyyy-MM-dd}.log].
log4j: Setting property [append] to [true].
log4j: setFile called: /cdcpd/apache-tomcat-7.0.53/cdcpd-logs/cdcpd-trace.log, true
log4j: setFile ended
log4j: Parsed "DailyRolling" options.
log4j: Finished configuring.
Can anyone please help me