- All Known Implementing Classes:
DefaultLogEntryFilter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The LogEntryFilter interface represents a filter used to determine if a LogEntry should be included or excluded.
The LogEntryFilter interface is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Implementations of this interface are expected to override the test(LogEntry) method, which takes a LogEntry parameter and returns true if the entry should be included
, or false if it should be excluded.
Example usage:
LogEntryFilter filter = entry -> entry.level().ordinal() >= LogLevel.INFO.ordinal();
boolean shouldInclude = filter.test(logEntry);
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LogEntryFilterA LogEntryFilter that allows all log entries to pass through. -
Method Summary
Modifier and TypeMethodDescriptionstatic LogEntryFilterallPass()Returns a LogEntryFilter that allows all log entries to pass through.booleanTest if aLogEntryshould be processed.
-
Field Details
-
ALL_PASS_FILTER
A LogEntryFilter that allows all log entries to pass through.This filter implementation always returns true, indicating that all log entries should be included and none filtered out.
-
-
Method Details
-
test
Test if aLogEntryshould be processed. -
allPass
Returns a LogEntryFilter that allows all log entries to pass through.- Returns:
- a LogEntryFilter that allows all log entries to pass through
-