I'm using log4j-extras
<dependency>
<groupId>log4j</groupId>
<artifactId>apache-log4j-extras</artifactId>
<version>${log4j.version}</version>
</dependency>
and following configuration
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=C:/logs/app.log
log4j.appender.file.Append=true
log4j.appender.file.RollingPolicy=org.apache.log4j.rolling.TimeBasedRollingPolicy
log4j.appender.file.RollingPolicy.FileNamePattern=C:/logs/app-%d{yyyy-MM-dd-HH_mm_ss}.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p
%c{1}:%L - %m%n
on my Windows machine.
Expectation is to see new file created every second, but it doesnt. All logs
appended to app.log initially created.
--
View this message in context:
http://apache-logging.6191.n7.nabble.com/RollingFileAppender-not-working-consistently-tp8582p75831.html
Sent from the Log4j - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]