Bug 1028129 - Need equivalent functionality to "RollingFileAppender" from log4j
Need equivalent functionality to "RollingFileAppender" from log4j
Status: CLOSED NEXTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Logging (Show other bugs)
unspecified
All All
unspecified Severity medium
: ---
: ---
Assigned To: James Perkins
Nikoleta Ziakova
Russell Dickenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-07 12:47 EST by TJ Cowhey
Modified: 2015-04-28 11:04 EDT (History)
2 users (show)

See Also:
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>
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-16 12:47:57 EDT
Type: Feature Request
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker EAP6-254 Optional Closed Make PeriodicSizeRotatingFileHandler configurable directly via CLI/web console 2015-10-21 07:50 EDT

  None (edit)
Description TJ Cowhey 2013-11-07 12:47:44 EST
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 12:47:57 EDT
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 11:04:39 EDT
John Doyle <jdoyle@jboss.org> 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.