Currently, JBoss log4j configuration comes with two existing log rolling appender sections:
RollingFileAppender – Rotate server.log files based on specified file size criteria DailyRollingFileAppender – Rotate server.log file based on specified time/date (daily by default)
However, I am looking for configuration which can rotate the log files based on file size and append the date/time stamp to the backup file created.
I have the following configuration in log4j XML file - log files are successfully getting rolled over based on size and maximum index criteria, but the backup files are not time/date stamped, instead they are created as ‘sever.log.1, server.log.2 etc…’.
<param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>