# Google Cloud Network Services V1 Client - Class LogConfig (0.8.2)

0.8.2 (latest) 0.8.1 0.7.1 0.6.1 0.5.0 0.4.0 0.3.0 0.2.3 0.1.1 Reference documentation and code samples for the Google Cloud Network Services V1 Client class LogConfig.

Specifies the logging options for the activity performed by this
plugin. If logging is enabled, plugin logs are exported to
Cloud Logging.

Generated from protobuf message `google.cloud.networkservices.v1.WasmPlugin.LogConfig`

## Namespace

Google \\ Cloud \\ NetworkServices \\ V1 \\ WasmPlugin

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ enable` | `bool` Optional. Specifies whether to enable logging for activity by this plugin. Defaults to `false`. |
| `↳ sample_rate` | `float` Non-empty default. Configures the sampling rate of activity logs, where `1.0` means all logged activity is reported and `0.0` means no activity is reported. A floating point value between `0.0` and `1.0` indicates that a percentage of log messages is stored. The default value when logging is enabled is `1.0`. The value of the field must be between `0` and `1` (inclusive). This field can be specified only if logging is enabled for this plugin. |
| `↳ min_log_level` | `int` Non-empty default. Specificies the lowest level of the plugin logs that are exported to Cloud Logging. This setting relates to the logs generated by using logging statements in your Wasm code. This field is can be set only if logging is enabled for the plugin. If the field is not provided when logging is enabled, it is set to `INFO` by default. |

### getEnable

Optional. Specifies whether to enable logging for activity by this
plugin.

Defaults to `false`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setEnable

Optional. Specifies whether to enable logging for activity by this
plugin.

Defaults to `false`.

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

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

### getSampleRate

Non-empty default. Configures the sampling rate of activity logs, where
`1.0` means all logged activity is reported and `0.0` means no activity
is reported. A floating point value between `0.0` and `1.0` indicates
that a percentage of log messages is stored.

The default value when logging is enabled is `1.0`. The value of the
field must be between `0` and `1` (inclusive).
This field can be specified only if logging is enabled for this plugin.

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

### setSampleRate

Non-empty default. Configures the sampling rate of activity logs, where
`1.0` means all logged activity is reported and `0.0` means no activity
is reported. A floating point value between `0.0` and `1.0` indicates
that a percentage of log messages is stored.

The default value when logging is enabled is `1.0`. The value of the
field must be between `0` and `1` (inclusive).
This field can be specified only if logging is enabled for this plugin.

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

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

### getMinLogLevel

Non-empty default. Specificies the lowest level of the plugin logs that
are exported to Cloud Logging. This setting relates to the logs generated
by using logging statements in your Wasm code.

This field is can be set only if logging is enabled for the plugin.
If the field is not provided when logging is enabled, it is set to
`INFO` by default.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [LogLevel](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.WasmPlugin.LogConfig.LogLevel). |

### setMinLogLevel

Non-empty default. Specificies the lowest level of the plugin logs that
are exported to Cloud Logging. This setting relates to the logs generated
by using logging statements in your Wasm code.

This field is can be set only if logging is enabled for the plugin.
If the field is not provided when logging is enabled, it is set to
`INFO` by default.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [LogLevel](https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.WasmPlugin.LogConfig.LogLevel). |

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