public class TraceLoggingEventEnhancer extends Object implements LoggingEventEnhancer
| Constructor and Description |
|---|
TraceLoggingEventEnhancer() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearTraceId()
Clearing a trace Id from the MDC
|
void |
enhanceLogEntry(com.google.cloud.logging.LogEntry.Builder builder,
ch.qos.logback.classic.spi.ILoggingEvent e) |
static String |
getCurrentTraceId()
Get the Trace ID associated with any logging done by the current thread.
|
static void |
setCurrentTraceId(String id)
Set the Trace ID associated with any logging done by the current thread.
|
public static void setCurrentTraceId(String id)
id - The traceID, in the form projects/[PROJECT_ID]/traces/[TRACE_ID]public static void clearTraceId()
public static String getCurrentTraceId()
public void enhanceLogEntry(com.google.cloud.logging.LogEntry.Builder builder,
ch.qos.logback.classic.spi.ILoggingEvent e)
enhanceLogEntry in interface LoggingEventEnhancerCopyright © 2022 Google LLC. All rights reserved.