Class RandomAccessFileAppender

    • Field Detail

      • fileName

        private final java.lang.String fileName
      • advertisement

        private java.lang.Object advertisement
    • Constructor Detail

      • RandomAccessFileAppender

        private RandomAccessFileAppender​(java.lang.String name,
                                         Layout<? extends java.io.Serializable> layout,
                                         Filter filter,
                                         RandomAccessFileManager manager,
                                         java.lang.String filename,
                                         boolean ignoreExceptions,
                                         boolean immediateFlush,
                                         Advertiser advertiser,
                                         Property[] properties)
    • Method Detail

      • 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 AbstractOutputStreamAppender<RandomAccessFileManager>
        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.
      • getFileName

        public java.lang.String getFileName()
        Returns the file name this appender is associated with.
        Returns:
        The File name.
      • getBufferSize

        public int getBufferSize()
        Returns the size of the file manager's buffer.
        Returns:
        the buffer size
      • createAppender

        @Deprecated
        public static <B extends RandomAccessFileAppender.Builder<B>> RandomAccessFileAppender createAppender​(java.lang.String fileName,
                                                                                                              java.lang.String append,
                                                                                                              java.lang.String name,
                                                                                                              java.lang.String immediateFlush,
                                                                                                              java.lang.String bufferSizeStr,
                                                                                                              java.lang.String ignore,
                                                                                                              Layout<? extends java.io.Serializable> layout,
                                                                                                              Filter filter,
                                                                                                              java.lang.String advertise,
                                                                                                              java.lang.String advertiseURI,
                                                                                                              Configuration configuration)
        Deprecated.
        Create a File Appender.
        Parameters:
        fileName - The name and path of the file.
        append - "True" if the file should be appended to, "false" if it should be overwritten. The default is "true".
        name - The name of the Appender.
        immediateFlush - "true" if the contents should be flushed on every write, "false" otherwise. The default is "true".
        bufferSizeStr - The buffer size, defaults to 262144.
        ignore - If "true" (default) exceptions encountered when appending events are logged; otherwise they are propagated to the caller.
        layout - The layout to use to format the event. If no layout is provided the default PatternLayout will be used.
        filter - The filter, if any, to use.
        advertise - "true" if the appender configuration should be advertised, "false" otherwise.
        advertiseURI - The advertised URI which can be used to retrieve the file contents.
        configuration - The Configuration.
        Returns:
        The FileAppender.