Class Routes


  • @Plugin(name="Routes",
            category="Core",
            printObject=true)
    public final class Routes
    extends java.lang.Object
    Contains the individual Route elements.
    • Field Detail

      • LOGGER

        private static final Logger LOGGER
      • pattern

        private final java.lang.String pattern
      • routes

        private final Route[] routes
    • Method Detail

      • createRoutes

        @Deprecated
        public static Routes createRoutes​(java.lang.String pattern,
                                          Route... routes)
        Deprecated.
        since 2.7; use newBuilder().
        Creates the Routes.
        Parameters:
        pattern - The pattern.
        routes - An array of Route elements.
        Returns:
        The Routes container.
      • getPattern

        public java.lang.String getPattern​(LogEvent event,
                                           java.util.concurrent.ConcurrentMap<java.lang.Object,​java.lang.Object> scriptStaticVariables)
        Returns the pattern.
        Parameters:
        event - The log event passed to the script (if there is a script.)
        scriptStaticVariables - The script's static variables.
        Returns:
        the pattern.
      • getPatternScript

        public AbstractScript getPatternScript()
        Gets the optional script that decides which route to pick.
        Returns:
        the optional script that decides which route to pick. May be null.
      • getRoute

        public Route getRoute​(java.lang.String key)
      • getRoutes

        public Route[] getRoutes()
        Returns the array of Route elements.
        Returns:
        an array of Route elements.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object