How to rotate Audit log based on size in JBoss EAP 6?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Issue
- Is it possible to ratate the audit log using
size-rotating-file-handlerin JBoss EAP 6 as below:
<size-rotating-file-handler name="SAMPLE_AUDIT" autoflush="true" formatter="json-formatter">
<file relative-to="jboss.server.log.dir" path="audit-log.log"/>
<rotate-size value="10m"/>
<max-backup-index value="9"/>
<append value="true"/>
</size-rotating-file-handler>
Resolution
-
Audit log can be can be configured by using a
file handleror by usingsyslog handler. -
Below is the information from xsd
jboss-as-config_1_5.xsd: <xs:complexType name="audit-log-handlersType"> <xs:annotation> <xs:documentation> Declaration of management operation audit logging handlers. </xs:documentation> </xs:annotation> <xs:choice minOccurs="1" maxOccurs="unbounded"> <xs:element name="file-handler" type="file-audit-log-handlerType"/> <xs:element name="syslog-handler" type="syslog-audit-log-handlerType"/> </xs:choice> </xs:complexType> :
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
