Description of problem: I need the ability to format our file naming structure specific to our enterprise rules. For example, our template specifies the following: <appender name="mylog" class="org.apache.log4j.rolling.RollingFileAppender"> <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy"> <param name="FileNamePattern" value="/myapp/app_%d{yyyyMMddHHmm}_mylog.log" /> </rollingPolicy> </appender> I know that I can use a periodic-rotating-file-handler to format the file names, but it is restrictive and cannot match our requirements: <periodic-rotating-file-handler name="FILE" autoflush="true"> <formatter> <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/> </formatter> <file relative-to="jboss.server.log.dir" path="server.log"/> <suffix value=".yyyyMMddHHmm"/> <append value="true"/> </periodic-rotating-file-handler>
There is a org.jboss.logmanager.handlers.PeriodicSizeRotatingFileHandler that can be used as a custom-handler. Also this will now be a fully supported resource in EAP 6.4, https://issues.jboss.org/browse/EAP6-254. This should resolve this issue.
John Doyle <jdoyle> updated the status of jira EAP6-254 to Closed