Package com.google.cloud.spring.logging
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 TypeMethodDescriptionvoid
enhanceJsonLogEntry
(Map<String, Object> jsonMap, ch.qos.logback.classic.spi.ILoggingEvent event) Add additional JSON data to the JSON log entry, based on theILoggingEvent
.
-
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 theILoggingEvent
. Users should put additional records tojsonMap
to extend the JSON object that will be logged.- Parameters:
jsonMap
- represents the JSON object that is produced by the Stackdriver JSON logging layoutevent
- the Logback logging event
-