Package | Description |
---|---|
com.google.cloud.logging |
A client for Cloud Logging - Real-time log management and analysis.
|
Modifier and Type | Method and Description |
---|---|
LogEntry.Builder |
LogEntry.Builder.addLabel(String key,
String value)
Adds a label to the log entry's labels.
|
LogEntry.Builder |
LogEntry.Builder.clearLabels()
Clears all the labels of the log entry.
|
protected LogEntry.Builder |
LoggingHandler.logEntryFor(LogRecord record) |
static LogEntry.Builder |
LogEntry.newBuilder(Payload<?> payload)
Returns a builder for
LogEntry objects given the entry payload. |
LogEntry.Builder |
LogEntry.Builder.setDestination(LogDestinationName destination)
Sets the log path destination name type associated with the log entry.
|
LogEntry.Builder |
LogEntry.Builder.setHttpRequest(HttpRequest httpRequest)
Sets information about the HTTP request associated with this log entry, if applicable.
|
LogEntry.Builder |
LogEntry.Builder.setInsertId(String insertId)
Sets a unique ID for the log entry.
|
LogEntry.Builder |
LogEntry.Builder.setLabels(Map<String,String> labels)
Sets an optional set of user-defined (key, value) data that provides additional information
about the log entry.
|
LogEntry.Builder |
LogEntry.Builder.setLogName(String logName)
Sets the name of the log to which this log entry belongs.
|
LogEntry.Builder |
LogEntry.Builder.setOperation(Operation operation)
Sets information about an operation associated with the log entry, if applicable.
|
LogEntry.Builder |
LogEntry.Builder.setPayload(Payload<?> payload)
Sets the payload for this log entry.
|
LogEntry.Builder |
LogEntry.Builder.setReceiveTimestamp(Instant receiveTimestamp)
Sets the time the log entry was received by Cloud Logging.
|
LogEntry.Builder |
LogEntry.Builder.setReceiveTimestamp(long milliseconds)
Deprecated.
This method is no longer recommended to setup the receive time timestamp.
Use |
LogEntry.Builder |
LogEntry.Builder.setResource(com.google.cloud.MonitoredResource resource)
Sets the monitored resource associated with this log entry.
|
LogEntry.Builder |
LogEntry.Builder.setSeverity(Severity severity)
Sets the severity of the log entry.
|
LogEntry.Builder |
LogEntry.Builder.setSourceLocation(SourceLocation sourceLocation)
Sets the source code location information associated with the log entry if any.
|
LogEntry.Builder |
LogEntry.Builder.setSpanId(Object spanId)
Sets the ID of the trace span associated with the log entry, if any.
|
LogEntry.Builder |
LogEntry.Builder.setSpanId(String spanId)
Sets the ID of the trace span associated with the log entry, if any.
|
LogEntry.Builder |
LogEntry.Builder.setTimestamp(Instant timestamp)
Sets the time at which the event described by the log entry occurred.
|
LogEntry.Builder |
LogEntry.Builder.setTimestamp(long milliseconds)
Deprecated.
This method is no longer recommended to setup the entry timestamp.
Use |
LogEntry.Builder |
LogEntry.Builder.setTrace(Object trace)
Sets the resource name of the trace associated with the log entry, if any.
|
LogEntry.Builder |
LogEntry.Builder.setTrace(String trace)
Sets the resource name of the trace associated with the log entry, if any.
|
LogEntry.Builder |
LogEntry.Builder.setTraceSampled(boolean traceSampled)
Sets the sampling decision of the trace span associated with the log entry.
|
LogEntry.Builder |
LogEntry.toBuilder()
Returns a
Builder for this log entry. |
Modifier and Type | Method and Description |
---|---|
void |
TraceLoggingEnhancer.enhanceLogEntry(LogEntry.Builder builder) |
void |
LoggingEnhancer.enhanceLogEntry(LogEntry.Builder builder) |
Copyright © 2023 Google LLC. All rights reserved.