# Google Cloud Tasks V2 Client - Class StackdriverLoggingConfig (2.2.0)

2.2.0 (latest) 2.1.2 2.0.2 1.15.2 1.14.6 1.13.2 1.12.2 1.11.11 Reference documentation and code samples for the Google Cloud Tasks V2 Client class StackdriverLoggingConfig.

Configuration options for writing logs to
[Stackdriver Logging](https://cloud.google.com/logging/docs/).

Generated from protobuf message `google.cloud.tasks.v2.StackdriverLoggingConfig`

## Namespace

Google \\ Cloud \\ Tasks \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ sampling_ratio` | `float` Specifies the fraction of operations to write to [Stackdriver Logging](https://cloud.google.com/logging/docs/). This field may contain any value between 0.0 and 1.0, inclusive. 0.0 is the default and means that no operations are logged. |

### getSamplingRatio

Specifies the fraction of operations to write to
[Stackdriver Logging](https://cloud.google.com/logging/docs/).

This field may contain any value between 0.0 and 1.0, inclusive.
0.0 is the default and means that no operations are logged.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `float` |   |

### setSamplingRatio

Specifies the fraction of operations to write to
[Stackdriver Logging](https://cloud.google.com/logging/docs/).

This field may contain any value between 0.0 and 1.0, inclusive.
0.0 is the default and means that no operations are logged.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `float` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |