Class OutputStreamAppender

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

@Plugin(name="OutputStream", category="Core", elementType="appender", printObject=true) public final class OutputStreamAppender extends AbstractOutputStreamAppender<OutputStreamManager>
Appends log events to a given output stream using a layout.

Character encoding is handled within the Layout.

  • Method Details

    • createAppender

      @PluginFactory public static OutputStreamAppender createAppender(Layout<? extends Serializable> layout, Filter filter, OutputStream target, String name, boolean follow, boolean ignore)
      Creates an OutputStream Appender.
      layout - The layout to use or null to get the default layout.
      filter - The Filter or null.
      target - an output stream.
      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 OutputStreamAppender.Builder<B>> B newBuilder()