Send feedback
Class Logging.WriteOption (3.20.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 3.20.0 keyboard_arrow_down
public static final class Logging . WriteOption extends Option
Class for specifying options for writing log entries.
Inheritance
Object >
com.google.cloud.logging.Option >
Logging.WriteOption
Inherited Members
com.google.cloud.logging.Option.equals(java.lang.Object)
com.google.cloud.logging.Option.hashCode()
com.google.cloud.logging.Option.toString()
Static Methods
public static Logging . WriteOption autoPopulateMetadata ( boolean autoPopulateMetadata )
Returns an option to opt-out automatic population of log entries metadata fields that are not
set.
Parameter
Name
Description
autoPopulateMetadata
boolean
destination(LogDestinationName destination)
public static Logging . WriteOption destination ( LogDestinationName destination )
Returns an option to specify a log destination resource path (see LogDestinationName
for details)
labels(Map<String,String> labels)
public 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.
logName(String logName)
public 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. Example: syslog
.
Parameter
Name
Description
logName
String
partialSuccess(boolean partialSuccess)
public static Logging . WriteOption partialSuccess ( boolean partialSuccess )
Parameter
Name
Description
partialSuccess
boolean
resource(MonitoredResource resource)
public static Logging . WriteOption resource ( 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.
Parameter
Name
Description
resource
com.google.cloud.MonitoredResource
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-04 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-10-04 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-04 UTC."]]