3 Replies Latest reply on Mar 24, 2015 5:46 AM by Peligros Nicolas

    Configure rotate-size for all log files

    Peligros Nicolas Newbie

      Hi all!

      I've configured a rotate-size for server.log file and it works (jboss 7.2 standalone):

        <size-rotating-file-handler name="FILE1">

                      <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"/>

                     <rotate-size value="10240k"/>

                      <max-backup-index value="50"/>

                      <append value="true"/>

                  </size-rotating-file-handler>

       

      Now, I would like to configure the maximum size all log files, including application-name.log and console.log:

      Someone can help me?


      The standalone.xml file is:


        <profile>

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

                  <console-handler name="CONSOLE">

                      <level name="DEBUG"/>

                      <formatter>

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

                      </formatter>

                      <target name="System.out"/>

                  </console-handler>

                  <size-rotating-file-handler name="FILE1">

                      <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"/>

                      <rotate-size value="10240k"/>

                      <max-backup-index value="50"/>

                      <append value="true"/>

                  </size-rotating-file-handler>

                  <logger category="com.arjuna">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="org.apache.tomcat.util.modeler">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="org.jboss.as.jpa">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="org.hibernate.SQL">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="org.hibernate">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="org.hibernate.cache.infinispan">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="org.infinispan">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="org.jboss.as.config">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="sun.rmi">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="jacorb">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="jacorb.config">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="jboss.jdbc.spy">

                      <level name="ERROR"/>

                  </logger>

                  <logger category="es.pac">

                      <level name="DEBUG"/>

                  </logger>

                  <root-logger>

                      <level name="DEBUG"/>

                      <handlers>

                          <handler name="CONSOLE"/>

                          <handler name="FILE1"/>

                      </handlers>

                  </root-logger>

              </subsystem>