public static final class Logging.WriteOption extends Object
Modifier and Type | Method and Description |
---|---|
static Logging.WriteOption |
autoPopulateMetadata(boolean autoPopulateMetadata)
Returns an option to opt-out automatic population of log entries metadata fields that are not
set.
|
static Logging.WriteOption |
destination(LogDestinationName destination)
Returns an option to specify a log destination resource path (see
LogDestinationName
for details) |
boolean |
equals(Object obj) |
int |
hashCode() |
static Logging.WriteOption |
labels(Map<String,String> labels)
Sets an option to specify (key, value) pairs that are added to the
LogEntry.getLabels() of each log entry written, except when a log entry already has a value
associated to the same key. |
static Logging.WriteOption |
logName(String logName)
Returns an option to specify a default log name (see
LogEntry.getLogName() ) for those
log entries that do not specify their own log name. |
static Logging.WriteOption |
partialSuccess(boolean partialSuccess)
Returns an option to set partialSuccess flag.
|
static Logging.WriteOption |
resource(com.google.cloud.MonitoredResource resource)
Returns an option to specify a default monitored resource (see
LogEntry.getResource() ) for those log entries that do not specify their own resource. |
String |
toString() |
public static Logging.WriteOption logName(String logName)
LogEntry.getLogName()
) for those
log entries that do not specify their own log name. Example: syslog
.public static Logging.WriteOption resource(com.google.cloud.MonitoredResource resource)
LogEntry.getResource()
) for those log entries that do not specify their own resource.public static Logging.WriteOption labels(Map<String,String> labels)
LogEntry.getLabels()
of each log entry written, except when a log entry already has a value
associated to the same key.public static Logging.WriteOption destination(LogDestinationName destination)
LogDestinationName
for details)public static Logging.WriteOption autoPopulateMetadata(boolean autoPopulateMetadata)
public static Logging.WriteOption partialSuccess(boolean partialSuccess)
Copyright © 2023 Google LLC. All rights reserved.