# Cloud Monitoring V3 API - Class Google::Cloud::Monitoring::V3::AlertPolicy::Condition::LogMatch (v1.10.0)

1.10.0 (latest) 1.9.0 1.8.0 1.7.1 1.6.1 1.5.1 1.4.0 1.3.0 1.2.0 1.1.0 1.0.1 0.18.0 0.17.0 0.16.0 0.15.2 0.14.0 0.13.0 0.12.1 0.11.0 0.10.0 0.9.0 0.8.0 0.7.1 Reference documentation and code samples for the Cloud Monitoring V3 API class Google::Cloud::Monitoring::V3::AlertPolicy::Condition::LogMatch.

A condition type that checks whether a log message in the [scoping
project](https://cloud.google.com/monitoring/api/v3#project_name)
satisfies the given filter. Logs from other projects in the metrics
scope are not evaluated.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #filter

    def filter() -> ::String

**Returns**

- (::String) --- Required. A logs-based filter. See [Advanced Logs
  Queries](https://cloud.google.com/logging/docs/view/advanced-queries) for how this filter should be constructed.

### #filter=

    def filter=(value) -> ::String

**Parameter**

- **value** (::String) --- Required. A logs-based filter. See [Advanced Logs
  Queries](https://cloud.google.com/logging/docs/view/advanced-queries) for how this filter should be constructed.
**Returns**

- (::String) --- Required. A logs-based filter. See [Advanced Logs
  Queries](https://cloud.google.com/logging/docs/view/advanced-queries) for how this filter should be constructed.

### #label_extractors

    def label_extractors() -> ::Google::Protobuf::Map{::String => ::String}

**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. A map from a label key to an extractor expression, which is used to extract the value for this label key. Each entry in this map is a specification for how data should be extracted from log entries that match `filter`. Each combination of extracted values is treated as a separate rule for the purposes of triggering notifications. Label keys and corresponding values can be used in notifications generated by this condition.


  Please see [the documentation on logs-based metric
  `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
  for syntax and examples.

### #label_extractors=

    def label_extractors=(value) -> ::Google::Protobuf::Map{::String => ::String}

**Parameter**

- **value** (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. A map from a label key to an extractor expression, which is used to extract the value for this label key. Each entry in this map is a specification for how data should be extracted from log entries that match `filter`. Each combination of extracted values is treated as a separate rule for the purposes of triggering notifications. Label keys and corresponding values can be used in notifications generated by this condition.


  Please see [the documentation on logs-based metric
  `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
  for syntax and examples.
**Returns**

- (::Google::Protobuf::Map{::String =\> ::String}) --- Optional. A map from a label key to an extractor expression, which is used to extract the value for this label key. Each entry in this map is a specification for how data should be extracted from log entries that match `filter`. Each combination of extracted values is treated as a separate rule for the purposes of triggering notifications. Label keys and corresponding values can be used in notifications generated by this condition.


  Please see [the documentation on logs-based metric
  `valueExtractor`s](https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor)
  for syntax and examples.