Package com.github.loki4j.logback.json
Class AbstractJsonProvider
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- com.github.loki4j.logback.json.AbstractJsonProvider
-
- All Implemented Interfaces:
ch.qos.logback.core.spi.ContextAware,ch.qos.logback.core.spi.LifeCycle,JsonProvider<ch.qos.logback.classic.spi.ILoggingEvent>
- Direct Known Subclasses:
AbstractFieldCollectionJsonProvider,AbstractFieldJsonProvider
public abstract class AbstractJsonProvider extends ch.qos.logback.core.spi.ContextAwareBase implements JsonProvider<ch.qos.logback.classic.spi.ILoggingEvent>
An abstract provider that writes a certain aspect of a logging event as a JSON fragment
-
-
Constructor Summary
Constructors Constructor Description AbstractJsonProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisEnabled()Indicates if this provider is enabled.booleanisStarted()voidsetEnabled(boolean enabled)Allows to configure if the provider is enabled.voidstart()voidstop()-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
Methods inherited from interface com.github.loki4j.logback.json.JsonProvider
canWrite, writeTo
-
-
-
-
Method Detail
-
start
public void start()
- Specified by:
startin interfacech.qos.logback.core.spi.LifeCycle
-
stop
public void stop()
- Specified by:
stopin interfacech.qos.logback.core.spi.LifeCycle
-
isStarted
public boolean isStarted()
- Specified by:
isStartedin interfacech.qos.logback.core.spi.LifeCycle
-
isEnabled
public boolean isEnabled()
Description copied from interface:JsonProviderIndicates if this provider is enabled. For a disabled provider no other its methods should be called.- Specified by:
isEnabledin interfaceJsonProvider<ch.qos.logback.classic.spi.ILoggingEvent>
-
setEnabled
public void setEnabled(boolean enabled)
Description copied from interface:JsonProviderAllows to configure if the provider is enabled.- Specified by:
setEnabledin interfaceJsonProvider<ch.qos.logback.classic.spi.ILoggingEvent>
-
-