Struct google_api_proto::google::cloud::retail::v2alpha::logging_config::LogGenerationRule
source · pub struct LogGenerationRule {
pub logging_level: i32,
pub info_log_sample_rate: Option<f32>,
}
Expand description
The logging configurations for services supporting log generation.
Fields§
§logging_level: i32
The logging level.
By default it is set to LOG_WARNINGS_AND_ABOVE
.
info_log_sample_rate: Option<f32>
The log sample rate for INFO level log entries. You can use this to reduce the number of entries generated for INFO level logs.
DO NOT set this field if the [logging_level][google.cloud.retail.v2alpha.LoggingConfig.LogGenerationRule.logging_level] is not [LoggingLevel.LOG_ALL][google.cloud.retail.v2alpha.LoggingConfig.LoggingLevel.LOG_ALL]. Otherwise, an INVALID_ARGUMENT error is returned.
Sample rate for INFO logs defaults to 1 when unset (generate and send all INFO logs to Cloud Logging). Its value must be greater than 0 and less than or equal to 1.
Implementations§
source§impl LogGenerationRule
impl LogGenerationRule
sourcepub fn logging_level(&self) -> LoggingLevel
pub fn logging_level(&self) -> LoggingLevel
Returns the enum value of logging_level
, or the default if the field is set to an invalid enum value.
sourcepub fn set_logging_level(&mut self, value: LoggingLevel)
pub fn set_logging_level(&mut self, value: LoggingLevel)
Sets logging_level
to the provided enum value.
sourcepub fn info_log_sample_rate(&self) -> f32
pub fn info_log_sample_rate(&self) -> f32
Returns the value of info_log_sample_rate
, or the default value if info_log_sample_rate
is unset.
Trait Implementations§
source§impl Clone for LogGenerationRule
impl Clone for LogGenerationRule
source§fn clone(&self) -> LogGenerationRule
fn clone(&self) -> LogGenerationRule
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LogGenerationRule
impl Debug for LogGenerationRule
source§impl Default for LogGenerationRule
impl Default for LogGenerationRule
source§impl Message for LogGenerationRule
impl Message for LogGenerationRule
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for LogGenerationRule
impl PartialEq for LogGenerationRule
source§fn eq(&self, other: &LogGenerationRule) -> bool
fn eq(&self, other: &LogGenerationRule) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for LogGenerationRule
impl StructuralPartialEq for LogGenerationRule
Auto Trait Implementations§
impl Freeze for LogGenerationRule
impl RefUnwindSafe for LogGenerationRule
impl Send for LogGenerationRule
impl Sync for LogGenerationRule
impl Unpin for LogGenerationRule
impl UnwindSafe for LogGenerationRule
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request