Note: This page pertains to older versions of JBossAS and may be out of date. A more complete description of logging may be found here: Logging
Configuring log4j logging in JBoss server
JBoss (until 5.x) 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 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 directory). The logging level on the console is 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 default file you will see the category.
<!-- Limit JBoss categories to INFO --> <category name="org.jboss"> <priority value="INFO"></priority> </category>
This limits the level to for all JBoss classes (apart from those which have more specific overrides provided). If you change this to 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:
Comments