Name
Filter
Synopsis
This interface defines the method that a
class must implement if it wants to filter log messages for a
Logger
or Handler
class.
isLoggable( )
should return
true
if the specified LogRecord
contains information that should be logged. It should return
false
if the LogRecord
should
be filtered out not appear in any destination log. Note that both
Logger
and Handler
provide
built-in filtering based on the severity level of the
LogRecord
. This Filter
interface exists to provide a customized filtering capability.
public interface Filter { // Public Instance Methods boolean isLoggable(LogRecord record); }
Passed To
Handler.setFilter( )
, Logger.setFilter(
)
Returned By
Handler.getFilter( )
, Logger.getFilter(
)
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.