Class LoggerNameLevelRewritePolicy

    • Method Detail

      • createPolicy

        @PluginFactory
        public static LoggerNameLevelRewritePolicy createPolicy​(@PluginAttribute("logger")
                                                                String loggerNamePrefix,
                                                                @PluginElement("KeyValuePair")
                                                                KeyValuePair[] levelPairs)
        Creates a policy to rewrite levels for a given logger name.
        Parameters:
        loggerNamePrefix - The logger name prefix for events to rewrite; all event logger names that start with this string will be rewritten.
        levelPairs - The levels to rewrite, the key is the source level, the value the target level.
        Returns:
        a new LoggerNameLevelRewritePolicy
      • rewrite

        public LogEvent rewrite​(LogEvent event)
        Description copied from interface: RewritePolicy
        Rewrite a logging event.
        Specified by:
        rewrite in interface RewritePolicy
        Parameters:
        event - a logging event that may be returned or used to create a new logging event.
        Returns:
        a logging event or null to suppress processing.