5.5.2. Sample XML Configuration for a Log Category
The following procedure demonstrates a sample configuration for a log category.
Procedure 5.2. Configure a Log Category
Define the Category
Use thecategory
property to specify the log category from which log messages will be captured.Theuse-parent-handlers
is set to"true"
by default. When set to"true"
, this category will use the log handlers of the root logger in addition to any other assigned handlers.<subsystem xmlns="urn:jboss:domain:logging:1.2"> <logger category="com.company.accounts.rec" use-parent-handlers="true">
Set the
level
propertyUse thelevel
property to set the maximum level of log message that the log category records.<subsystem xmlns="urn:jboss:domain:logging:1.2"> <logger category="com.company.accounts.rec" use-parent-handlers="true"> <level name="WARN"/>
List
handlers
handlers
is a list of log handlers.<subsystem xmlns="urn:jboss:domain:logging:1.2"> <logger category="com.company.accounts.rec" use-parent-handlers="true"> <level name="WARN"/> <handlers> <handler name="accounts-rec"/> </handlers> </logger> </subsystem>