Class 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 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:
        reject in class AbstractFilterInterceptor
        Parameters:
        log - the specific log
        Returns:
        true if the tag of the log is NOT in the whitelist, false otherwise