Reference documentation and code samples for the Stackdriver Logging V2 Client class LogExclusion.
Specifies a set of log entries that are filtered out by a sink. If your Google Cloud resource receives a large volume of log entries, you can use exclusions to reduce your chargeable logs. Note that exclusions on organization-level and folder-level sinks don't apply to child resources.
Note also that you cannot modify the _Required sink or exclude logs from it.
Generated from protobuf message google.logging.v2.LogExclusion
Namespace
Google \ Cloud \ Logging \ V2Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Required. A client-assigned identifier, such as "load-balancer-exclusion"
. Identifiers are limited to 100 characters and can include only letters, digits, underscores, hyphens, and periods. First character has to be alphanumeric.
↳ description
string
Optional. A description of this exclusion.
↳ filter
string
Required. An advanced logs filter
that matches the log entries to be excluded. By using the sample function
, you can exclude less than 100% of the matching log entries. For example, the following query matches 99% of low-severity log entries from Google Cloud Storage buckets: resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)
↳ disabled
bool
Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field.
↳ create_time
Google\Protobuf\Timestamp
Output only. The creation timestamp of the exclusion. This field may not be present for older exclusions.
↳ update_time
Google\Protobuf\Timestamp
Output only. The last update timestamp of the exclusion. This field may not be present for older exclusions.
getName
Required. A client-assigned identifier, such as "load-balancer-exclusion"
. Identifiers are limited to 100 characters and
can include only letters, digits, underscores, hyphens, and periods. First
character has to be alphanumeric.
string
setName
Required. A client-assigned identifier, such as "load-balancer-exclusion"
. Identifiers are limited to 100 characters and
can include only letters, digits, underscores, hyphens, and periods. First
character has to be alphanumeric.
var
string
$this
getDescription
Optional. A description of this exclusion.
string
setDescription
Optional. A description of this exclusion.
var
string
$this
getFilter
Required. An advanced logs filter that matches the log entries to be excluded. By using the sample function , you can exclude less than 100% of the matching log entries.
For example, the following query matches 99% of low-severity log entries
from Google Cloud Storage buckets: resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)
string
setFilter
Required. An advanced logs filter that matches the log entries to be excluded. By using the sample function , you can exclude less than 100% of the matching log entries.
For example, the following query matches 99% of low-severity log entries
from Google Cloud Storage buckets: resource.type=gcs_bucket severity<ERROR sample(insertId, 0.99)
var
string
$this
getDisabled
Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field.
bool
setDisabled
Optional. If set to True, then this exclusion is disabled and it does not exclude any log entries. You can update an exclusion to change the value of this field.
var
bool
$this
getCreateTime
Output only. The creation timestamp of the exclusion.
This field may not be present for older exclusions.
hasCreateTime
clearCreateTime
setCreateTime
Output only. The creation timestamp of the exclusion.
This field may not be present for older exclusions.
$this
getUpdateTime
Output only. The last update timestamp of the exclusion.
This field may not be present for older exclusions.
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. The last update timestamp of the exclusion.
This field may not be present for older exclusions.
$this