Class 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
    • Field Summary

      • Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

        context
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isEnabled()
      Indicates if this provider is enabled.
      boolean isStarted()  
      void setEnabled​(boolean enabled)
      Allows to configure if the provider is enabled.
      void start()  
      void stop()  
      • 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
    • Constructor Detail

      • AbstractJsonProvider

        public AbstractJsonProvider()
    • Method Detail

      • start

        public void start()
        Specified by:
        start in interface ch.qos.logback.core.spi.LifeCycle
      • stop

        public void stop()
        Specified by:
        stop in interface ch.qos.logback.core.spi.LifeCycle
      • isStarted

        public boolean isStarted()
        Specified by:
        isStarted in interface ch.qos.logback.core.spi.LifeCycle
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: JsonProvider
        Indicates if this provider is enabled. For a disabled provider no other its methods should be called.
        Specified by:
        isEnabled in interface JsonProvider<ch.qos.logback.classic.spi.ILoggingEvent>
      • setEnabled

        public void setEnabled​(boolean enabled)
        Description copied from interface: JsonProvider
        Allows to configure if the provider is enabled.
        Specified by:
        setEnabled in interface JsonProvider<ch.qos.logback.classic.spi.ILoggingEvent>