Class LoggerSpecificEncoder

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.encoder.EncoderBase<E>
ch.qos.logback.core.encoder.LayoutWrappingEncoder<E>
ch.qos.logback.core.pattern.PatternLayoutEncoderBase<ch.qos.logback.classic.spi.ILoggingEvent>
org.apache.sling.commons.log.logback.internal.util.LoggerSpecificEncoder
All Implemented Interfaces:
ch.qos.logback.core.encoder.Encoder<ch.qos.logback.classic.spi.ILoggingEvent>, ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.LifeCycle

public class LoggerSpecificEncoder extends ch.qos.logback.core.pattern.PatternLayoutEncoderBase<ch.qos.logback.classic.spi.ILoggingEvent>
Pattern layout encoder for specific loggers
  • Field Summary

    Fields inherited from class ch.qos.logback.core.pattern.PatternLayoutEncoderBase

    outputPatternAsHeader

    Fields inherited from class ch.qos.logback.core.encoder.LayoutWrappingEncoder

    layout

    Fields inherited from class ch.qos.logback.core.encoder.EncoderBase

    started

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

    context
  • Constructor Summary

    Constructors
    Constructor
    Description
    LoggerSpecificEncoder(ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent> defaultLayout)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addLogConfig(org.apache.sling.commons.log.logback.internal.LogConfig config)
    Add LogConfig which associates all the categories with the layout
    byte[]
    encode(ch.qos.logback.classic.spi.ILoggingEvent event)
    Encodes the text for the event

    Methods inherited from class ch.qos.logback.core.pattern.PatternLayoutEncoderBase

    getPattern, isOutputPatternAsHeader, isOutputPatternAsPresentationHeader, setLayout, setOutputPatternAsHeader, setOutputPatternAsPresentationHeader, setPattern

    Methods inherited from class ch.qos.logback.core.encoder.LayoutWrappingEncoder

    footerBytes, getCharset, getLayout, headerBytes, isStarted, setCharset, setImmediateFlush, setParent, start, 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 Details

    • LoggerSpecificEncoder

      public LoggerSpecificEncoder(ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent> defaultLayout)
      Constructor
      Parameters:
      defaultLayout - the default layout the encoder is for if no better match is found
  • Method Details

    • encode

      public byte[] encode(ch.qos.logback.classic.spi.ILoggingEvent event)
      Encodes the text for the event
      Specified by:
      encode in interface ch.qos.logback.core.encoder.Encoder<ch.qos.logback.classic.spi.ILoggingEvent>
      Overrides:
      encode in class ch.qos.logback.core.encoder.LayoutWrappingEncoder<ch.qos.logback.classic.spi.ILoggingEvent>
      Parameters:
      event - the event to encode
    • addLogConfig

      public void addLogConfig(org.apache.sling.commons.log.logback.internal.LogConfig config)
      Add LogConfig which associates all the categories with the layout
      Parameters:
      config - the config to process