Module logstash.logback.encoder
Class IncludeExcludeHeaderFilter
java.lang.Object
net.logstash.logback.composite.accessevent.IncludeExcludeHeaderFilter
- All Implemented Interfaces:
HeaderFilter
A simple
HeaderFilter that determines whether or not a header is included based
on a set of included header names or excluded header names.
If both includes and excludes are empty, then all header names will be included.
If includes is not empty and excludes is empty, then only those headers in the includes will be included.
If includes is empty and excludes is not empty, then all headers except those in the excludes will be included.
If includes is not empty and excludes is not empty, then an exception will be thrown.
All comparisons are case-insensitive.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExclude(String exclude) voidaddInclude(String include) booleanincludeHeader(String headerName, String headerValue) Returnstrueif the given header should be included in the log event outputvoidremoveExclude(String exclude) voidremoveInclude(String include)
-
Constructor Details
-
IncludeExcludeHeaderFilter
public IncludeExcludeHeaderFilter()
-
-
Method Details
-
includeHeader
Description copied from interface:HeaderFilterReturnstrueif the given header should be included in the log event output- Specified by:
includeHeaderin interfaceHeaderFilter- Parameters:
headerName- the header nameheaderValue- the header value- Returns:
trueif the given header should be included in the log event output
-
getIncludes
-
getExcludes
-
addInclude
-
removeInclude
-
addExclude
-
removeExclude
-