此内容没有您所选择的语言版本。
5.5.3. Sample XML Configuration for a Console Log Handler
The following procedure demonstrates a sample configuration for a console log handler.
Procedure 5.3. Configure the Console Log Handler
Add the Log Handler Identifier Information
Thenameproperty sets the unique identifier for this log handler.Whenautoflushis set to"true"the log messages will be sent to the handler's target immediately upon request.<subsystem xmlns="urn:jboss:domain:logging:1.2"> <console-handler name="CONSOLE" autoflush="true">
<subsystem xmlns="urn:jboss:domain:logging:1.2"> <console-handler name="CONSOLE" autoflush="true">Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
levelPropertyThelevelproperty sets the maximum level of log messages recorded.<subsystem xmlns="urn:jboss:domain:logging:1.2"> <console-handler name="CONSOLE" autoflush="true"> <level name="INFO"/><subsystem xmlns="urn:jboss:domain:logging:1.2"> <console-handler name="CONSOLE" autoflush="true"> <level name="INFO"/>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
encodingOutputUseencodingto set the character encoding scheme to be used for the output.<subsystem xmlns="urn:jboss:domain:logging:1.2"> <console-handler name="CONSOLE" autoflush="true"> <level name="INFO"/> <encoding value="UTF-8"/><subsystem xmlns="urn:jboss:domain:logging:1.2"> <console-handler name="CONSOLE" autoflush="true"> <level name="INFO"/> <encoding value="UTF-8"/>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define the
targetValueThetargetproperty defines the system output stream where the output of the log handler goes. This can beSystem.errfor the system error stream, orSystem.outfor the standard out stream.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define the
filter-specPropertyThefilter-specproperty is an expression value that defines a filter. The example provided defines a filter that does not match a pattern:not(match("JBAS.*")).Copy to Clipboard Copied! Toggle word wrap Toggle overflow Specify the
formatterUseformatterto list the log formatter used by the log handler.Copy to Clipboard Copied! Toggle word wrap Toggle overflow