Package io.dropwizard.metrics5.logback
Class InstrumentedAppender
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.UnsynchronizedAppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
- io.dropwizard.metrics5.logback.InstrumentedAppender
-
- All Implemented Interfaces:
ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent>,ch.qos.logback.core.spi.ContextAware,ch.qos.logback.core.spi.FilterAttachable<ch.qos.logback.classic.spi.ILoggingEvent>,ch.qos.logback.core.spi.LifeCycle
public class InstrumentedAppender extends ch.qos.logback.core.UnsynchronizedAppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>A LogbackAppenderwhich has six meters, one for each logging level and one for the total number of statements being logged. The meter names are the logging level names appended to the name of the appender.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_REGISTRYstatic StringREGISTRY_PROPERTY_NAME
-
Constructor Summary
Constructors Constructor Description InstrumentedAppender()Create a new instrumented appender using the given registry name.InstrumentedAppender(io.dropwizard.metrics5.MetricRegistry registry)Create a new instrumented appender using the given registry.InstrumentedAppender(String registryName)Create a new instrumented appender using the given registry name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappend(ch.qos.logback.classic.spi.ILoggingEvent event)voidstart()-
Methods inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, stop, toString
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
-
-
-
Field Detail
-
DEFAULT_REGISTRY
public static final String DEFAULT_REGISTRY
- See Also:
- Constant Field Values
-
REGISTRY_PROPERTY_NAME
public static final String REGISTRY_PROPERTY_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InstrumentedAppender
public InstrumentedAppender()
Create a new instrumented appender using the given registry name.
-
InstrumentedAppender
public InstrumentedAppender(String registryName)
Create a new instrumented appender using the given registry name.- Parameters:
registryName- the name of the registry inSharedMetricRegistries
-
InstrumentedAppender
public InstrumentedAppender(io.dropwizard.metrics5.MetricRegistry registry)
Create a new instrumented appender using the given registry.- Parameters:
registry- the metric registry
-
-
Method Detail
-
start
public void start()
- Specified by:
startin interfacech.qos.logback.core.spi.LifeCycle- Overrides:
startin classch.qos.logback.core.UnsynchronizedAppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
append
protected void append(ch.qos.logback.classic.spi.ILoggingEvent event)
- Specified by:
appendin classch.qos.logback.core.UnsynchronizedAppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
-