I had this warning in log when my application was starting
log4j:WARN Unrecognized element rollingPolicy
tried to Google for answers, but adding apache-log4j-extras-1.1.jar didn't helped me.
I'm using slf4j-log4j12 1.7.2
with log4j 1.2.17
.
Instead of rollingPolicy I used DailyRollingFileAppender and no extras jar is needed.
<appender name="rollingLog" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="${catalina.home}/logs/rolling.log" />
<param name="append" value="true" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} %-5p [%t] [%c] %m%n"/>
</layout>
</appender>
Or you can use the extras but make sure to change log4j.xml appender line to:
<appender name="ROLL" class="org.apache.log4j.rolling.RollingFileAppender">
and do away with it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With