DOYENSYS Knowledge Portal

We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal

Wednesday, April 11, 2018

To Enable Server.log rotation in JBoss EAP 7.0 Standalone Mode.

Step 1:
Take a backup the standalone.xml file.

Step 2:
Comment the periodic-rotating-file-handler which is already existing in standalone.xml file and add the below custom handler in order to rotate the server.log based on size

<subsystem xmlns="urn:jboss:domain:logging:1.2">
    <custom-handler name="filehandler"                                          <!-- Add from this line -->
               pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
            <property name="maxBackupIndex" value="20"/>
            <property name="rotateSize"
               value="1048576"/>                                                 <!-- 100MB -->
            <property name="suffix" value=".yyyy-MM-dd"/>
            <property name="fileName"
    </custom-handler>                                                             <!-- Upto this line --> 
    <logger category="com.arjuna">
        <level name="WARN"/>
    <logger category="org.apache.tomcat.util.modeler">
        <level name="WARN"/>
    <logger category="">
        <level name="DEBUG"/>
    <logger category="sun.rmi">
        <level name="WARN"/>
    <logger category="jacorb">
        <level name="WARN"/>
    <logger category="jacorb.config">
        <level name="ERROR"/>
        <level name="INFO"/>
            <handler name="filehandler"/>                         <!-- Add this line in the root-logger -->

No comments: