pub struct LoggingOptions {
pub dir: String,
pub level: Option<String>,
pub log_format: LogFormat,
pub max_log_files: usize,
pub append_stdout: bool,
pub enable_otlp_tracing: bool,
pub otlp_endpoint: Option<String>,
pub tracing_sample_ratio: Option<TracingSampleOptions>,
pub slow_query: SlowQueryOptions,
}
Expand description
The logging options that used to initialize the logger.
Fields§
§dir: String
The directory to store log files. If not set, logs will be written to stdout.
level: Option<String>
The log level that can be one of “trace”, “debug”, “info”, “warn”, “error”. Default is “info”.
log_format: LogFormat
The log format that can be one of “json” or “text”. Default is “text”.
max_log_files: usize
The maximum number of log files set by default.
append_stdout: bool
Whether to append logs to stdout. Default is true.
enable_otlp_tracing: bool
Whether to enable tracing with OTLP. Default is false.
otlp_endpoint: Option<String>
The endpoint of OTLP. Default is “http://localhost:4317”.
tracing_sample_ratio: Option<TracingSampleOptions>
The tracing sample ratio.
slow_query: SlowQueryOptions
The logging options of slow query.
Trait Implementations§
source§impl Clone for LoggingOptions
impl Clone for LoggingOptions
source§fn clone(&self) -> LoggingOptions
fn clone(&self) -> LoggingOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LoggingOptions
impl Debug for LoggingOptions
source§impl Default for LoggingOptions
impl Default for LoggingOptions
source§impl<'de> Deserialize<'de> for LoggingOptionswhere
LoggingOptions: Default,
impl<'de> Deserialize<'de> for LoggingOptionswhere
LoggingOptions: Default,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for LoggingOptions
impl PartialEq for LoggingOptions
source§impl Serialize for LoggingOptions
impl Serialize for LoggingOptions
impl Eq for LoggingOptions
Auto Trait Implementations§
impl Freeze for LoggingOptions
impl RefUnwindSafe for LoggingOptions
impl Send for LoggingOptions
impl Sync for LoggingOptions
impl Unpin for LoggingOptions
impl UnwindSafe for LoggingOptions
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§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>
Wrap the input message
T
in a tonic::Request
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>
Wrap the input message
T
in a tonic::Request