How to reduce JBoss Log size?

Document ID : KB000052813
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

The DRIVE\jboss-4.0.5.GA\server\default\log files can become large due to logging.

Solution:

To reduce the size of the JBoss Log:

First, shut down JBoss. You will need to modify the file DRIVE\JBossDir\server\default\conf\log4j.xml.

Note, please back it up before doing any editing.

Search for section:

<appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">

Inside here are 'param' tags. By default there is a param tag for 'Threshold' in the FILE appender, but there is one for the CONSOLE appender.

If this tag does not exist, then add it:

<param name="Threshold" value="ERROR"/>

If the Threshold tag exists and has a different value than ERROR, change this value to ERROR or WARN and save the file. Be certain it is entered prior to the </appender> tag but not within another matched pair.

More details can be found on the JBoss site at http://docs.jboss.org/process-guide/en/html/logging.html.

In this method, the log file size will be drastically reduced. It will only show the ERROR messages. WARN would a bit more verbose but not the level of detail by default.