Filter
Stay organized with collections
Save and categorize content based on your preferences.
Page Summary
The Filter interface provides granular control over logging, going beyond log levels.
Loggers and Handlers can utilize Filter to determine if a LogRecord should be published using the isLoggable method.
isLoggable method in Filter interface checks and returns true if the given LogRecord should be published.
public interface
Filter
A Filter can be used to provide fine grain control over
what is logged, beyond the control provided by log levels.
Each Logger and each Handler can have a filter associated with it.
The Logger or Handler will call the isLoggable method to check
if a given LogRecord should be published. If isLoggable returns
false, the LogRecord will be discarded.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[],["Filters, associated with Loggers or Handlers, control which log records are published. The core functionality is encapsulated in the `isLoggable` method. This method takes a `LogRecord` as input and determines if it should be published. If `isLoggable` returns `true`, the record is published; otherwise, it's discarded, allowing for precise control over logging beyond standard log levels.\n"]]