Class ScriptPatternSelector

  • All Implemented Interfaces:
    LocationAware, PatternSelector

    @Plugin(name="ScriptPatternSelector",
            category="Core",
            elementType="patternSelector",
            printObject=true)
    public class ScriptPatternSelector
    extends java.lang.Object
    implements PatternSelector, LocationAware
    Selects the pattern to use based on the result of executing a Script. The returned value will be used as the "key" to choose between one of the configured patterns. If no key is returned or there is no match the default pattern will be used.
    • Field Detail

      • formatterMap

        private final java.util.Map<java.lang.String,​PatternFormatter[]> formatterMap
      • patternMap

        private final java.util.Map<java.lang.String,​java.lang.String> patternMap
      • defaultPattern

        private final java.lang.String defaultPattern
      • LOGGER

        private static Logger LOGGER
      • requiresLocation

        private final boolean requiresLocation
    • Constructor Detail

      • ScriptPatternSelector

        private ScriptPatternSelector​(Configuration config,
                                      AbstractScript script,
                                      PatternMatch[] properties,
                                      java.lang.String defaultPattern,
                                      boolean alwaysWriteExceptions,
                                      boolean disableAnsi,
                                      boolean noConsoleNoAnsi)
      • ScriptPatternSelector

        @Deprecated
        public ScriptPatternSelector​(AbstractScript script,
                                     PatternMatch[] properties,
                                     java.lang.String defaultPattern,
                                     boolean alwaysWriteExceptions,
                                     boolean disableAnsi,
                                     boolean noConsoleNoAnsi,
                                     Configuration config)
        Deprecated.
        Use newBuilder() instead. This will be private in a future version.