此内容没有您所选择的语言版本。
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
Thenameproperty sets the unique identifier for this log handler.<async-handler name="Async_NFS_handlers">Set the
levelPropertyThelevelproperty sets the maximum level of log message that the root logger records.<async-handler name="Async_NFS_handlers"> <level name="INFO"/>Define the
queue-lengthThequeue-lengthdefines 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-actiondefines how this handler responds when its queue length is exceeded. This can be set toBLOCKorDISCARD.BLOCKmakes the logging application wait until there is available space in the queue. This is the same behavior as an non-async log handler.DISCARDallows 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
subhandlersThesubhandlerslist 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>