java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
net.logstash.logback.composite.AbstractJsonProvider<Event>
net.logstash.logback.composite.AbstractFieldJsonProvider<ch.qos.logback.classic.spi.ILoggingEvent>
org.apache.skywalking.apm.toolkit.log.logback.v1.x.logstash.TraceIdJsonProvider
All Implemented Interfaces:
ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.LifeCycle, net.logstash.logback.composite.FieldNamesAware<net.logstash.logback.fieldnames.LogstashFieldNames>, net.logstash.logback.composite.JsonProvider<ch.qos.logback.classic.spi.ILoggingEvent>

public class TraceIdJsonProvider extends net.logstash.logback.composite.AbstractFieldJsonProvider<ch.qos.logback.classic.spi.ILoggingEvent> implements net.logstash.logback.composite.FieldNamesAware<net.logstash.logback.fieldnames.LogstashFieldNames>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

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

    context
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getTracingId(ch.qos.logback.classic.spi.ILoggingEvent event)
     
    void
    setFieldNames(net.logstash.logback.fieldnames.LogstashFieldNames fieldNames)
     
    void
    writeTo(com.fasterxml.jackson.core.JsonGenerator generator, ch.qos.logback.classic.spi.ILoggingEvent event)
     

    Methods inherited from class net.logstash.logback.composite.AbstractFieldJsonProvider

    getFieldName, setFieldName

    Methods inherited from class net.logstash.logback.composite.AbstractJsonProvider

    isStarted, prepareForDeferredProcessing, 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
  • Field Details

  • Constructor Details

    • TraceIdJsonProvider

      public TraceIdJsonProvider()
  • Method Details

    • writeTo

      public void writeTo(com.fasterxml.jackson.core.JsonGenerator generator, ch.qos.logback.classic.spi.ILoggingEvent event) throws IOException
      Specified by:
      writeTo in interface net.logstash.logback.composite.JsonProvider<ch.qos.logback.classic.spi.ILoggingEvent>
      Throws:
      IOException
    • setFieldNames

      public void setFieldNames(net.logstash.logback.fieldnames.LogstashFieldNames fieldNames)
      Specified by:
      setFieldNames in interface net.logstash.logback.composite.FieldNamesAware<net.logstash.logback.fieldnames.LogstashFieldNames>
    • getTracingId

      public String getTracingId(ch.qos.logback.classic.spi.ILoggingEvent event)