Package io.prometheus.client.logback
Class InstrumentedAppender
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.UnsynchronizedAppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
- io.prometheus.client.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>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COUNTER_NAME
private Counter.Child
debugCounter
private static Counter
defaultCounter
private Counter.Child
errorCounter
private Counter.Child
infoCounter
private Counter.Child
traceCounter
private Counter.Child
warnCounter
-
Constructor Summary
Constructors Modifier Constructor Description InstrumentedAppender()
Create a new instrumented appender using the default registry.InstrumentedAppender(CollectorRegistry registry)
Create a new instrumented appender using the supplied registry.private
InstrumentedAppender(Counter counter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
append(ch.qos.logback.classic.spi.ILoggingEvent event)
void
start()
-
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
-
COUNTER_NAME
public static final java.lang.String COUNTER_NAME
- See Also:
- Constant Field Values
-
defaultCounter
private static final Counter defaultCounter
-
traceCounter
private final Counter.Child traceCounter
-
debugCounter
private final Counter.Child debugCounter
-
infoCounter
private final Counter.Child infoCounter
-
warnCounter
private final Counter.Child warnCounter
-
errorCounter
private final Counter.Child errorCounter
-
-
Constructor Detail
-
InstrumentedAppender
public InstrumentedAppender()
Create a new instrumented appender using the default registry.
-
InstrumentedAppender
public InstrumentedAppender(CollectorRegistry registry)
Create a new instrumented appender using the supplied registry.
-
InstrumentedAppender
private InstrumentedAppender(Counter counter)
-
-
Method Detail
-
start
public void start()
- Specified by:
start
in interfacech.qos.logback.core.spi.LifeCycle
- Overrides:
start
in classch.qos.logback.core.UnsynchronizedAppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
append
protected void append(ch.qos.logback.classic.spi.ILoggingEvent event)
- Specified by:
append
in classch.qos.logback.core.UnsynchronizedAppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
-