Class LogbackSkyWalkingContextPatternConverter

java.lang.Object
ch.qos.logback.core.pattern.Converter<E>
ch.qos.logback.core.pattern.FormattingConverter<E>
ch.qos.logback.core.pattern.DynamicConverter<ch.qos.logback.classic.spi.ILoggingEvent>
ch.qos.logback.classic.pattern.ClassicConverter
org.apache.skywalking.apm.toolkit.log.logback.v1.x.LogbackSkyWalkingContextPatternConverter
All Implemented Interfaces:
ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.LifeCycle

public class LogbackSkyWalkingContextPatternConverter extends ch.qos.logback.classic.pattern.ClassicConverter
  • Field Summary

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

    started
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    convert(ch.qos.logback.classic.spi.ILoggingEvent iLoggingEvent)
    As default, return "SW_CTX: N/A" to the output message, if SkyWalking agent in active mode, return the real SkyWalking context in the recent Context, if existed.

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

    addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getFirstOption, getOptionList, isStarted, setContext, setOptionList, start, stop

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

    getFormattingInfo, setFormattingInfo, write

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

    getNext, setNext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LogbackSkyWalkingContextPatternConverter

      public LogbackSkyWalkingContextPatternConverter()
  • Method Details

    • convert

      public String convert(ch.qos.logback.classic.spi.ILoggingEvent iLoggingEvent)
      As default, return "SW_CTX: N/A" to the output message, if SkyWalking agent in active mode, return the real SkyWalking context in the recent Context, if existed.
      Specified by:
      convert in class ch.qos.logback.core.pattern.Converter<ch.qos.logback.classic.spi.ILoggingEvent>
      Parameters:
      iLoggingEvent - the event
      Returns:
      the SkyWalking context: N/A, or the real SkyWalking context.