JBossWiki : ConfigureLogging
Wiki Home: ConfigureLogging [EN]
[Permalink]
[Recent Changes]
[History]
[RSS Feed][RDF Feed][Atom Feed][Print]

Your trail: ConfigureLogging

Configuring log4j logging in JBoss server

JBoss uses log4j for logging. If you're not familiar with this package and would like to use it in your applications, you should read more about it on the log4j web site. Full documentation on using log4j can be found at http://logging.apache.org/log4j/.

JBoss uses an XML configuration file to set up log4j. You can find this file in the conf directory. It defines a set of appenders for logging. By default, JBoss produces output to both the console and a log file (stored in the log directory). The logging level on the console is INFO whereas the file contains all logging. So if things are going wrong and there doesn't seem to be any useful information in the console, always check the log file to see if there are any debug messages which might help you track down the problem. You may also have to boost the logging limits set for individual categories. For example, in the defaultlog4j.xml file you will see the org.jboss category.

<!-- Limit JBoss categories to INFO -->
<category name="org.jboss">
    <priority value="INFO"/>
</category>

This limits the level to INFO for all JBoss classes (apart from those which have more specific overrides provided). If you change this to DEBUG it will produce a lot more logging output.

The file appender is set up to produce a new log file every day, so it doesn't produce a one every time you restart the server and it won?t write to a single file indefinitely. The current log file is called server.log. Older files have the date they were written added to the name. You will notice that the log directory also contains HTTP request logs which are produced by the web container.

Examples:


Other languages:

Log in to make links between pages

The page last changed on Thu Sep 21 03:42:51 EDT 2006 by nekop