@Plugin(name="LlapRandomAccessFileAppender",
category="Core",
elementType="appender",
printObject=true)
public final class LlapRandomAccessFileAppender
extends org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender<org.apache.logging.log4j.core.appender.RandomAccessFileManager>
Log4jQueryCompleteMarker
then the underlying file will be renamed
(using the ".done" suffix) when the appender is stopped.
Moreover, the appender filters events with Log4jQueryCompleteMarker
so they never appear in the logs.Modifier and Type | Class and Description |
---|---|
static class |
LlapRandomAccessFileAppender.Builder<B extends LlapRandomAccessFileAppender.Builder<B>>
Builds LlapRandomAccessFileAppender instances.
|
Modifier | Constructor and Description |
---|---|
protected |
LlapRandomAccessFileAppender(String name,
org.apache.logging.log4j.core.Layout<? extends Serializable> layout,
org.apache.logging.log4j.core.Filter filter,
boolean ignoreExceptions,
boolean immediateFlush,
org.apache.logging.log4j.core.config.Property[] properties,
org.apache.logging.log4j.core.appender.RandomAccessFileManager manager) |
Modifier and Type | Method and Description |
---|---|
void |
append(org.apache.logging.log4j.core.LogEvent event)
Appends the log entry to the file when required.
|
static <B extends LlapRandomAccessFileAppender.Builder<B>> |
newBuilder()
Returns a builder for a LlapRandomAccessFileAppender.
|
boolean |
stop(long timeout,
TimeUnit timeUnit) |
directEncodeEvent, getImmediateFlush, getManager, start, stop, writeByteArrayToManager
error, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, requiresLocation, setHandler, toSerializable, toString
addFilter, getFilter, getPropertyArray, hasFilter, isFiltered, removeFilter
equalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stop, stop
protected LlapRandomAccessFileAppender(String name, org.apache.logging.log4j.core.Layout<? extends Serializable> layout, org.apache.logging.log4j.core.Filter filter, boolean ignoreExceptions, boolean immediateFlush, org.apache.logging.log4j.core.config.Property[] properties, org.apache.logging.log4j.core.appender.RandomAccessFileManager manager)
public boolean stop(long timeout, TimeUnit timeUnit)
stop
in interface org.apache.logging.log4j.core.LifeCycle2
stop
in class org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender<org.apache.logging.log4j.core.appender.RandomAccessFileManager>
public void append(org.apache.logging.log4j.core.LogEvent event)
append
in interface org.apache.logging.log4j.core.Appender
append
in class org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender<org.apache.logging.log4j.core.appender.RandomAccessFileManager>
event
- The LogEvent.@PluginBuilderFactory public static <B extends LlapRandomAccessFileAppender.Builder<B>> B newBuilder()
Copyright © 2022 The Apache Software Foundation. All rights reserved.