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.
#sample_rate
defsample_rate()->::Float
Returns
(::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.
#sample_rate=
defsample_rate=(value)->::Float
Parameter
value (::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.
Returns
(::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.
[[["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 2025-08-28 UTC."],[],[],null,["# Network Services V1 API - Class Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig (v2.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.4.0 (latest)](/ruby/docs/reference/google-cloud-network_services-v1/latest/Google-Cloud-NetworkServices-V1-WasmPlugin-LogConfig)\n- [2.3.0](/ruby/docs/reference/google-cloud-network_services-v1/2.3.0/Google-Cloud-NetworkServices-V1-WasmPlugin-LogConfig)\n- [2.2.0](/ruby/docs/reference/google-cloud-network_services-v1/2.2.0/Google-Cloud-NetworkServices-V1-WasmPlugin-LogConfig)\n- [2.1.0](/ruby/docs/reference/google-cloud-network_services-v1/2.1.0/Google-Cloud-NetworkServices-V1-WasmPlugin-LogConfig)\n- [2.0.1](/ruby/docs/reference/google-cloud-network_services-v1/2.0.1/Google-Cloud-NetworkServices-V1-WasmPlugin-LogConfig)\n- [1.2.0](/ruby/docs/reference/google-cloud-network_services-v1/1.2.0/Google-Cloud-NetworkServices-V1-WasmPlugin-LogConfig)\n- [1.1.0](/ruby/docs/reference/google-cloud-network_services-v1/1.1.0/Google-Cloud-NetworkServices-V1-WasmPlugin-LogConfig)\n- [1.0.1](/ruby/docs/reference/google-cloud-network_services-v1/1.0.1/Google-Cloud-NetworkServices-V1-WasmPlugin-LogConfig)\n- [0.2.0](/ruby/docs/reference/google-cloud-network_services-v1/0.2.0/Google-Cloud-NetworkServices-V1-WasmPlugin-LogConfig)\n- [0.1.0](/ruby/docs/reference/google-cloud-network_services-v1/0.1.0/Google-Cloud-NetworkServices-V1-WasmPlugin-LogConfig) \nReference documentation and code samples for the Network Services V1 API class Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig.\n\nSpecifies the logging options for the activity performed by this\nplugin. If logging is enabled, plugin logs are exported to\nCloud Logging. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #enable\n\n def enable() -\u003e ::Boolean\n\n**Returns**\n\n- (::Boolean) --- Optional. Specifies whether to enable logging for activity by this plugin.\n\n Defaults to `false`.\n\n### #enable=\n\n def enable=(value) -\u003e ::Boolean\n\n**Parameter**\n\n- **value** (::Boolean) --- Optional. Specifies whether to enable logging for activity by this plugin.\n\n\nDefaults to `false`. \n**Returns**\n\n- (::Boolean) --- Optional. Specifies whether to enable logging for activity by this plugin.\n\n Defaults to `false`.\n\n### #min_log_level\n\n def min_log_level() -\u003e ::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig::LogLevel\n\n**Returns**\n\n- ([::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig::LogLevel](./Google-Cloud-NetworkServices-V1-WasmPlugin-LogConfig-LogLevel)) --- 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.\n\n\n This field is can be set only if logging is enabled for the plugin.\n\n If the field is not provided when logging is enabled, it is set to\n `INFO` by default.\n\n### #min_log_level=\n\n def min_log_level=(value) -\u003e ::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig::LogLevel\n\n**Parameter**\n\n- **value** ([::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig::LogLevel](./Google-Cloud-NetworkServices-V1-WasmPlugin-LogConfig-LogLevel)) --- 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.\n\n\n This field is can be set only if logging is enabled for the plugin.\n\n If the field is not provided when logging is enabled, it is set to\n`INFO` by default. \n**Returns**\n\n- ([::Google::Cloud::NetworkServices::V1::WasmPlugin::LogConfig::LogLevel](./Google-Cloud-NetworkServices-V1-WasmPlugin-LogConfig-LogLevel)) --- 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.\n\n\n This field is can be set only if logging is enabled for the plugin.\n\n If the field is not provided when logging is enabled, it is set to\n `INFO` by default.\n\n### #sample_rate\n\n def sample_rate() -\u003e ::Float\n\n**Returns**\n\n- (::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.\n\n\n The default value when logging is enabled is `1.0`. The value of the\n field must be between `0` and `1` (inclusive).\n\n This field can be specified only if logging is enabled for this plugin.\n\n### #sample_rate=\n\n def sample_rate=(value) -\u003e ::Float\n\n**Parameter**\n\n- **value** (::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.\n\n\n The default value when logging is enabled is `1.0`. The value of the\n field must be between `0` and `1` (inclusive).\n\nThis field can be specified only if logging is enabled for this plugin. \n**Returns**\n\n- (::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.\n\n\n The default value when logging is enabled is `1.0`. The value of the\n field must be between `0` and `1` (inclusive).\n\n This field can be specified only if logging is enabled for this plugin."]]