Package com.google.cloud.logging
Class Logging.WriteOption
java.lang.Object
com.google.cloud.logging.Logging.WriteOption
- All Implemented Interfaces:
Serializable
- Enclosing interface:
- Logging
Class for specifying options for writing log entries.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Logging.WriteOptionautoPopulateMetadata(boolean autoPopulateMetadata) Returns an option to opt-out automatic population of log entries metadata fields that are not set.static Logging.WriteOptiondestination(LogDestinationName destination) Returns an option to specify a log destination resource path (seeLogDestinationNamefor details)booleaninthashCode()static Logging.WriteOptionSets an option to specify (key, value) pairs that are added to theLogEntry.getLabels()of each log entry written, except when a log entry already has a value associated to the same key.static Logging.WriteOptionReturns an option to specify a default log name (seeLogEntry.getLogName()) for those log entries that do not specify their own log name.static Logging.WriteOptionpartialSuccess(boolean partialSuccess) Returns an option to set partialSuccess flag.static Logging.WriteOptionresource(com.google.cloud.MonitoredResource resource) Returns an option to specify a default monitored resource (seeLogEntry.getResource()) for those log entries that do not specify their own resource.toString()
-
Method Details
-
logName
Returns an option to specify a default log name (seeLogEntry.getLogName()) for those log entries that do not specify their own log name. Example:syslog. -
resource
Returns an option to specify a default monitored resource (seeLogEntry.getResource()) for those log entries that do not specify their own resource. -
labels
Sets an option to specify (key, value) pairs that are added to theLogEntry.getLabels()of each log entry written, except when a log entry already has a value associated to the same key. -
destination
Returns an option to specify a log destination resource path (seeLogDestinationNamefor details) -
autoPopulateMetadata
Returns an option to opt-out automatic population of log entries metadata fields that are not set. -
partialSuccess
Returns an option to set partialSuccess flag. See the API documentation for more details. -
equals
-
hashCode
public int hashCode() -
toString
-