5.5.7. Sample XML Configuration for a Async Log Handler
The following procedure demonstrates a sample configuration for an async log handler
Procedure 5.7. Configure the Async Log Handler
Add the Async Log Handler Identifier Information
Thename
property sets the unique identifier for this log handler.<async-handler name="Async_NFS_handlers">
Set the
level
PropertyThelevel
property sets the maximum level of log message that the root logger records.<async-handler name="Async_NFS_handlers"> <level name="INFO"/>
Define the
queue-length
Thequeue-length
defines the maximum number of log messages that will be held by this handler while waiting for sub-handlers to respond.<async-handler name="Async_NFS_handlers"> <level name="INFO"/> <queue-length value="512"/>
Set Overflow Response
Theoverflow-action
defines how this handler responds when its queue length is exceeded. This can be set toBLOCK
orDISCARD
.BLOCK
makes the logging application wait until there is available space in the queue. This is the same behavior as an non-async log handler.DISCARD
allows the logging application to continue but the log message is deleted.<async-handler name="Async_NFS_handlers"> <level name="INFO"/> <queue-length value="512"/> <overflow-action value="block"/>
List
subhandlers
Thesubhandlers
list is the list of log handlers to which this async handler passes its log messages.<async-handler name="Async_NFS_handlers"> <level name="INFO"/> <queue-length value="512"/> <overflow-action value="block"/> <subhandlers> <handler name="FILE"/> <handler name="accounts-record"/> </subhandlers> </async-handler>