public abstract class AbstractAppenderFactory<E extends ch.qos.logback.core.spi.DeferredProcessingAware> extends Object implements AppenderFactory<E>
AppenderFactory
.
Configuration Parameters:
Name | Default | Description |
threshold |
ALL | The minimum event level the appender will handle. |
logFormat |
(none) | An appender-specific log format. |
timeZone |
UTC |
The time zone to which event timestamps will be converted. Ignored if logFormat is supplied. |
queueSize |
AsyncAppenderBase |
The maximum capacity of the blocking queue. |
includeCallerData |
AsyncAppenderBase |
Whether to include caller data, required for line numbers. Beware, is considered expensive. |
discardingThreshold |
AsyncAppenderBase |
By default, when the blocking queue has 20% capacity remaining, it will drop events of level TRACE, DEBUG and INFO, keeping only events of level WARN and ERROR. To keep all events, set discardingThreshold to 0. |
messageRate |
Maximum message rate: average duration between messages. Extra messages are discarded. This setting avoids flooding a paid logging service by accident. For example, a duration of 100ms allows for a maximum of 10 messages per second and 30s would mean 1 message every 30 seconds. The maximum acceptable duration is 1 minute. By default, this duration is not set and this feature is disabled. | |
filterFactories |
(none) |
A list of filters to apply to the appender, in order,
after the threshold .
|
Modifier and Type | Field and Description |
---|---|
protected DiscoverableLayoutFactory<E> |
layout |
protected String |
logFormat |
protected @NotNull ch.qos.logback.classic.Level |
threshold |
protected @NotNull TimeZone |
timeZone |
Constructor and Description |
---|
AbstractAppenderFactory() |
Modifier and Type | Method and Description |
---|---|
protected ch.qos.logback.core.LayoutBase<E> |
buildLayout(ch.qos.logback.classic.LoggerContext context,
LayoutFactory<E> defaultLayoutFactory) |
int |
getDiscardingThreshold() |
List<FilterFactory<E>> |
getFilterFactories() |
DiscoverableLayoutFactory<?> |
getLayout() |
String |
getLogFormat() |
Duration |
getMessageRate() |
int |
getQueueSize() |
String |
getThreshold() |
TimeZone |
getTimeZone() |
boolean |
isIncludeCallerData() |
void |
setDiscardingThreshold(int discardingThreshold) |
void |
setFilterFactories(List<FilterFactory<E>> appenders) |
void |
setIncludeCallerData(boolean includeCallerData) |
void |
setLayout(DiscoverableLayoutFactory<E> layout) |
void |
setLogFormat(String logFormat) |
void |
setMessageRate(Duration messageRate) |
void |
setNeverBlock(boolean neverBlock) |
void |
setQueueSize(int queueSize) |
void |
setThreshold(String threshold) |
void |
setTimeZone(String zoneId) |
void |
setTimeZone(TimeZone timeZone) |
protected ch.qos.logback.core.Appender<E> |
wrapAsync(ch.qos.logback.core.Appender<E> appender,
AsyncAppenderFactory<E> asyncAppenderFactory) |
protected ch.qos.logback.core.Appender<E> |
wrapAsync(ch.qos.logback.core.Appender<E> appender,
AsyncAppenderFactory<E> asyncAppenderFactory,
ch.qos.logback.core.Context context) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
build
@NotNull protected @NotNull ch.qos.logback.classic.Level threshold
@Nullable protected DiscoverableLayoutFactory<E extends ch.qos.logback.core.spi.DeferredProcessingAware> layout
@NotNull protected @NotNull TimeZone timeZone
public int getQueueSize()
public void setQueueSize(int queueSize)
public int getDiscardingThreshold()
public void setDiscardingThreshold(int discardingThreshold)
public void setMessageRate(Duration messageRate)
public String getThreshold()
public void setThreshold(String threshold)
public TimeZone getTimeZone()
public void setTimeZone(String zoneId)
public void setTimeZone(TimeZone timeZone)
public boolean isIncludeCallerData()
public void setIncludeCallerData(boolean includeCallerData)
public List<FilterFactory<E>> getFilterFactories()
public void setFilterFactories(List<FilterFactory<E>> appenders)
public void setNeverBlock(boolean neverBlock)
@Nullable public DiscoverableLayoutFactory<?> getLayout()
public void setLayout(@Nullable DiscoverableLayoutFactory<E> layout)
protected ch.qos.logback.core.Appender<E> wrapAsync(ch.qos.logback.core.Appender<E> appender, AsyncAppenderFactory<E> asyncAppenderFactory)
protected ch.qos.logback.core.Appender<E> wrapAsync(ch.qos.logback.core.Appender<E> appender, AsyncAppenderFactory<E> asyncAppenderFactory, ch.qos.logback.core.Context context)
protected ch.qos.logback.core.LayoutBase<E> buildLayout(ch.qos.logback.classic.LoggerContext context, LayoutFactory<E> defaultLayoutFactory)
Copyright © 2011. All rights reserved.