Class Log4jNullAppender

    • Constructor Detail

      • Log4jNullAppender

        protected Log4jNullAppender​(String name,
                                    Filter filter,
                                    Layout<? extends Serializable> layout,
                                    boolean ignoreExceptions,
                                    Property[] properties)
        Creates a new appender.
        Parameters:
        name - The appender name.
        filter - The filter to associate with the appender.
        layout - The layout to use to format the event.
        ignoreExceptions - If true, exceptions will be logged and suppressed. If false errors will be logged and then passed to the application.
        properties - An array of properties for the appender.
    • Method Detail

      • ignore

        public void ignore​(LogEvent event)
        Ignores an event.
        Parameters:
        event - The event to ignore.
      • create

        public static Log4jNullAppender create​(String name)
        Creates a named appender. This method does the same as calling new Builder().setName(name).build().
        Parameters:
        name - The appender name.
        Returns:
        The created appender.