3 Replies Latest reply on Mar 15, 2017 6:30 AM by jviebig

    how to configure standalone.xml  for log4j2

    Amrit Khuntia Newbie

      <subsystem xmlns="urn:jboss:domain:logging:1.0">

         <console-handler name="CONSOLE" autoflush="true">

             <level name="DEBUG"/>

             <formatter>

                 <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

             </formatter>

         </console-handler>

         <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=".yyyy-MM-dd"/>

         </periodic-rotating-file-handler>

         <logger category="com.arjuna">

             <level name="WARN"/>

         </logger>

         [...]

         <root-logger>

             <level name="DEBUG"/>

             <handlers>

                 <handler name="CONSOLE"/>

                 <handler name="FILE"/>

             </handlers>

         </root-logger>

      </subsystem>