public class IncludeExcludeHeaderFilter extends Object implements HeaderFilter
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 and Description |
|---|
IncludeExcludeHeaderFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExclude(String exclude) |
void |
addInclude(String include) |
Set<String> |
getExcludes() |
Set<String> |
getIncludes() |
boolean |
includeHeader(String headerName,
String headerValue)
Returns
true if the given header should be included in the log event output |
void |
removeExclude(String exclude) |
void |
removeInclude(String include) |
public boolean includeHeader(String headerName, String headerValue)
HeaderFiltertrue if the given header should be included in the log event outputincludeHeader in interface HeaderFilterheaderName - the header nameheaderValue - the header valuetrue if the given header should be included in the log event outputpublic void addInclude(String include)
public void removeInclude(String include)
public void addExclude(String exclude)
public void removeExclude(String exclude)
Copyright © 2013–2022. All rights reserved.