Show Table of Contents
11.7.2. Configure a Log Category in the Management Console
Log Categories define what log messages to capture and which log handlers to send them to.
Important
Currently Log Categories can only be fully configured in the server configuration file. The final release will support full configuration using the management console and command line administration tools.
To add a new Log Handler in the server configuration file:
Halt the server
Stop the JBoss Enterprise Application Platform 6 server if it is already running.Open the configuration file in a text editor.
Depending on whether you run the Enterprise Application Platform as a managed domain or standalone server, the default configuration file location isEAP_HOME/domain/configuration/domain.xmlorEAP_HOME/standalone/configuration/standalone.xml.Find the Logging Subsystem node
Locate the Logging Subsystem configuration node. It will look like this:<subsystem xmlns="urn:jboss:domain:logging:1.1"> </subsystem>
The Logging Subsystem configuration will already contain many items such as Log Handlers and Categories.Add a new logger node
Add a new<logger>node as a child of the Logging Subsystem node. It must have an attribute calledcategorywhich is the class or package name which this logger will receive messages from.<logger category="com.acme.accounts.receivables"> </logger>
Optionally theuse-parent-handlersattribute can also be added. This attribute can be set totrueorfalse. When set totrueall messages received by this log category are also processed by the handlers of the root logger. If not specified, this attribute defaults totrue.Specify log level
Add a<level>element with an attribute called name. The value of name must be the log level that this category will apply to.<logger category="com.acme.accounts.receivables"> <level name="DEBUG"/> </logger>
Optional: Specify log handlers
Add a<handlers>element containing a<handler>element for each log handler you wish to use to process the log messages from this category.If no handlers are specified then the log message will not be processed any further unless use-parent-handler is set to true in which case the handlers of the root-logger are used.<logger category="com.acme.accounts.receivables"> <level name="DEBUG"/> <handlers> <handler name="ACCOUNTS-DEBUG-FILE"/> </handlers> </logger>- Restart the JBoss Enterprise Application Platform 6 server.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.