Interface JsonLoggingEventEnhancer

All Known Implementing Classes:
LogstashLoggingEventEnhancer

public interface JsonLoggingEventEnhancer
This interface allows users to write additional JSON record the JSON log layout.

Implementing classes can be used as <loggingEventEnhancer> elements in the logback definition for StackdriverJsonLayout.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    enhanceJsonLogEntry(Map<String,Object> jsonMap, ch.qos.logback.classic.spi.ILoggingEvent event)
    Add additional JSON data to the JSON log entry, based on the ILoggingEvent.
  • Method Details

    • enhanceJsonLogEntry

      void enhanceJsonLogEntry(Map<String,Object> jsonMap, ch.qos.logback.classic.spi.ILoggingEvent event)
      Add additional JSON data to the JSON log entry, based on the ILoggingEvent. Users should put additional records to jsonMap to extend the JSON object that will be logged.
      Parameters:
      jsonMap - represents the JSON object that is produced by the Stackdriver JSON logging layout
      event - the Logback logging event