@Plugin(name="HushableRandomAccessFile",
category="Core",
elementType="appender",
printObject=true)
public final class HushableRandomAccessFileAppender
extends org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender<org.apache.logging.log4j.core.appender.RandomAccessFileManager>
| Modifier and Type | Method and Description |
|---|---|
void |
append(org.apache.logging.log4j.core.LogEvent event)
Write the log entry rolling over the file when required.
|
static HushableRandomAccessFileAppender |
createAppender(String fileName,
String append,
String name,
String immediateFlush,
String bufferSizeStr,
String ignore,
org.apache.logging.log4j.core.Layout<? extends Serializable> layout,
org.apache.logging.log4j.core.Filter filter,
String advertise,
String advertiseURI,
org.apache.logging.log4j.core.config.Configuration config)
Create a File Appender.
|
int |
getBufferSize()
Returns the size of the file manager's buffer.
|
String |
getFileName()
Returns the file name this appender is associated with.
|
void |
stop() |
directEncodeEvent, getImmediateFlush, getManager, start, stop, stop, writeByteArrayToManagererror, error, error, getHandler, getLayout, getName, ignoreExceptions, parseInt, setHandler, toStringaddFilter, getFilter, hasFilter, isFiltered, removeFilterequalsImpl, getState, getStatusLogger, hashCodeImpl, initialize, isInitialized, isStarted, isStarting, isStopped, isStopping, setStarted, setStarting, setState, setStopped, setStopping, stoppublic void stop()
stop in interface org.apache.logging.log4j.core.LifeCyclestop in class org.apache.logging.log4j.core.AbstractLifeCyclepublic void append(org.apache.logging.log4j.core.LogEvent event)
append in interface org.apache.logging.log4j.core.Appenderappend in class org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender<org.apache.logging.log4j.core.appender.RandomAccessFileManager>event - The LogEvent.public String getFileName()
public int getBufferSize()
@PluginFactory public static HushableRandomAccessFileAppender createAppender(@PluginAttribute(value="fileName") String fileName, @PluginAttribute(value="append") String append, @PluginAttribute(value="name") String name, @PluginAttribute(value="immediateFlush") String immediateFlush, @PluginAttribute(value="bufferSize") String bufferSizeStr, @PluginAttribute(value="ignoreExceptions") String ignore, @PluginElement(value="Layout") org.apache.logging.log4j.core.Layout<? extends Serializable> layout, @PluginElement(value="Filter") org.apache.logging.log4j.core.Filter filter, @PluginAttribute(value="advertise") String advertise, @PluginAttribute(value="advertiseURI") String advertiseURI, @PluginConfiguration org.apache.logging.log4j.core.config.Configuration config)
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 .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.config - The Configuration.Copyright © 2019 The Apache Software Foundation. All Rights Reserved.