| Summary: | Need equivalent functionality to "RollingFileAppender" from log4j | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | TJ Cowhey <tcowhey> |
| Component: | Logging | Assignee: | James Perkins <jperkins> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | Nikoleta Hlavickova <nziakova> |
| Severity: | medium | Docs Contact: | Russell Dickenson <rdickens> |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | brian.stansberry, fernando80920 |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| 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 16:47:57 UTC | Type: | Feature Request |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
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. |
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>