Class AbstractOutputStreamAppender<M extends OutputStreamManager>

    • Constructor Detail

      • AbstractOutputStreamAppender

        protected AbstractOutputStreamAppender​(java.lang.String name,
                                               Layout<? extends java.io.Serializable> layout,
                                               Filter filter,
                                               boolean ignoreExceptions,
                                               boolean immediateFlush,
                                               M manager)
        Instantiates a WriterAppender and set the output destination to a new OutputStreamWriter initialized with os as its OutputStream.
        Parameters:
        name - The name of the Appender.
        layout - The layout to format the message.
        manager - The OutputStreamManager.
    • Method Detail

      • getImmediateFlush

        public boolean getImmediateFlush()
        Gets the immediate flush setting.
        Returns:
        immediate flush.
      • getManager

        public M getManager()
        Gets the manager.
        Returns:
        the manager.
      • stop

        public boolean stop​(long timeout,
                            java.util.concurrent.TimeUnit timeUnit)
        Description copied from class: AbstractFilterable
        Cleanup the Filter.
        Specified by:
        stop in interface LifeCycle2
        Overrides:
        stop in class AbstractFilterable
        Parameters:
        timeout - the maximum time to wait
        timeUnit - the time unit of the timeout argument
        Returns:
        true if the receiver was stopped cleanly and normally, false otherwise.
      • stop

        protected boolean stop​(long timeout,
                               java.util.concurrent.TimeUnit timeUnit,
                               boolean changeLifeCycleState)
        Description copied from class: AbstractFilterable
        Cleanup the Filter.
        Overrides:
        stop in class AbstractFilterable
      • append

        public void append​(LogEvent event)
        Actual writing occurs here.

        Most subclasses of AbstractOutputStreamAppender will need to override this method.

        Parameters:
        event - The LogEvent.
      • directEncodeEvent

        protected void directEncodeEvent​(LogEvent event)
      • writeByteArrayToManager

        protected void writeByteArrayToManager​(LogEvent event)