Bug 1028129 - Need equivalent functionality to "RollingFileAppender" from log4j
Summary: Need equivalent functionality to "RollingFileAppender" from log4j
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Logging
Version: unspecified
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
: ---
Assignee: James Perkins
QA Contact: Nikoleta Hlavickova
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-07 17:47 UTC by TJ Cowhey
Modified: 2015-04-28 15:04 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
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>
Clone Of:
Environment:
Last Closed: 2014-09-16 16:47:57 UTC
Type: Feature Request
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker EAP6-254 0 Optional Closed Make PeriodicSizeRotatingFileHandler configurable directly via CLI/web console 2015-10-21 11:50:50 UTC

Description TJ Cowhey 2013-11-07 17:47:44 UTC
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>

Comment 2 James Perkins 2014-09-16 16:47:57 UTC
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.

Comment 3 JBoss JIRA Server 2015-04-28 15:04:39 UTC
John Doyle <jdoyle> updated the status of jira EAP6-254 to Closed


Note You need to log in before you can comment on or make changes to this bug.