Class AbstractLoki4jEncoder

  • All Implemented Interfaces:
    ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.LifeCycle, Loki4jEncoder
    Direct Known Subclasses:
    JsonEncoder, ProtobufEncoder

    public abstract class AbstractLoki4jEncoder
    extends ch.qos.logback.core.spi.ContextAwareBase
    implements Loki4jEncoder
    Abstract class that provides basic Loki4j batch encoding functionality
    • Field Detail

      • charset

        protected final java.nio.charset.Charset charset
    • Constructor Detail

      • AbstractLoki4jEncoder

        public AbstractLoki4jEncoder()
    • 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
      • eventToMessage

        public java.lang.String eventToMessage​(ch.qos.logback.classic.spi.ILoggingEvent e)
        Specified by:
        eventToMessage in interface Loki4jEncoder
      • setSortByTime

        public void setSortByTime​(boolean sortByTime)
      • setStaticLabels

        public void setStaticLabels​(boolean staticLabels)