Show TOC Start of Content Area

Background documentation Filter  Locate the document in its SAP Library structure

Use

A filter can be added to both the log controller and/or the log, to restrict or alter the output behavior further.

Multiple filters are permitted for each log controller and/or log.

Implementation

The actual filter implementation has to be done by you, according to the interface defined in the package. Basically, this evaluates the LogRecord object and veto accordingly. The name of the only method indicates that a Boolean true is returned when the logRecord passes the filter, otherwise false is returned.

Since the implementation is done by users, the class name of the filter is not known in advance. If the user-defined filter class is to be specified in the configuration file, a fully qualified class name has to be used.

Caution

This works only if the class is already included in the classpath during the configuration. In case it needs its own class loader, the latter has to be set clearly in the configuration constructor.

 

End of Content Area