Class WriterAppender

All Implemented Interfaces:
Appender, Filterable, LocationAware, LifeCycle, LifeCycle2

@Plugin(name="Writer", category="Core", elementType="appender", printObject=true) public final class WriterAppender extends AbstractWriterAppender<WriterManager>
Appends log events to a Writer.
  • Method Details

    • createAppender

      @PluginFactory public static WriterAppender createAppender(StringLayout layout, Filter filter, Writer target, String name, boolean follow, boolean ignore)
      Creates a WriterAppender.
      layout - The layout to use or null to get the default layout.
      filter - The Filter or null.
      target - The target Writer
      follow - If true will follow changes to the underlying output stream. Use false as the default.
      name - The name of the Appender (required).
      ignore - If "true" (default) exceptions encountered when appending events are logged; otherwise they are propagated to the caller. Use true as the default.
      The ConsoleAppender.
    • newBuilder

      @PluginBuilderFactory public static <B extends WriterAppender.Builder<B>> B newBuilder()