Package com.elvishew.xlog.interceptor
Class WhitelistTagsFilterInterceptor
- java.lang.Object
-
- com.elvishew.xlog.interceptor.AbstractFilterInterceptor
-
- com.elvishew.xlog.interceptor.WhitelistTagsFilterInterceptor
-
- All Implemented Interfaces:
Interceptor
public class WhitelistTagsFilterInterceptor extends AbstractFilterInterceptor
Filter out the logs with a tag that is NOT in the whitelist.- Since:
- 1.3.0
-
-
Constructor Summary
Constructors Constructor Description WhitelistTagsFilterInterceptor(java.lang.Iterable<java.lang.String> whitelistTags)ConstructorWhitelistTagsFilterInterceptor(java.lang.String... whitelistTags)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanreject(LogItem log)Whether specific log should be filtered out.-
Methods inherited from class com.elvishew.xlog.interceptor.AbstractFilterInterceptor
intercept
-
-
-
-
Constructor Detail
-
WhitelistTagsFilterInterceptor
public WhitelistTagsFilterInterceptor(java.lang.String... whitelistTags)
Constructor- Parameters:
whitelistTags- the whitelist tags, the logs with a tag that is NOT in the whitelist will be filtered out
-
WhitelistTagsFilterInterceptor
public WhitelistTagsFilterInterceptor(java.lang.Iterable<java.lang.String> whitelistTags)
Constructor- Parameters:
whitelistTags- the whitelist tags, the logs with a tag that is NOT in the whitelist will be filtered out
-
-
Method Detail
-
reject
protected boolean reject(LogItem log)
Whether specific log should be filtered out.- Specified by:
rejectin classAbstractFilterInterceptor- Parameters:
log- the specific log- Returns:
- true if the tag of the log is NOT in the whitelist, false otherwise
-
-