Class LogstashMarkersJsonProvider

All Implemented Interfaces:
ContextAware, JsonProvider<ILoggingEvent>

public class LogstashMarkersJsonProvider extends AbstractJsonProvider<ILoggingEvent>
A JsonProvider that processes LogstashMarkers (generally created via Markers).
  • Constructor Details

    • LogstashMarkersJsonProvider

      public LogstashMarkersJsonProvider()
  • Method Details

    • writeTo

      public void writeTo(JsonGenerator generator, ILoggingEvent event) throws IOException
      Description copied from interface: JsonProvider
      Writes information about the event, to the given generator.

      When called, the generator is assumed to be within a JSON object context (i.e. this provider should write fields and their values to the generator). Upon return, the generator should be within the same JSON object context.

      Parameters:
      generator - the JsonGenerator to produce JSON content
      event - the event to convert into JSON
      Throws:
      IOException - if an I/O error occurs
    • isLogstashMarker

      public static boolean isLogstashMarker(org.slf4j.Marker marker)