pub struct SettingsBuilder { /* private fields */ }
Expand description
For building Settings
.
Implementations§
Source§impl SettingsBuilder
impl SettingsBuilder
Sourcepub fn with_environment_variable(self, name: &'static str) -> Self
pub fn with_environment_variable(self, name: &'static str) -> Self
Set the environment variable used for overriding the Settings::default_level
.
Defaults to RUST_LOG
.
Sourcepub fn with_default_level(self, level: impl Into<LevelFilter>) -> Self
pub fn with_default_level(self, level: impl Into<LevelFilter>) -> Self
Set the default [LevelFilter
].
Defaults to [LevelFilter::OFF
].
Sourcepub fn console_log_settings_builder(self) -> ConsoleLogSettingsBuilder
pub fn console_log_settings_builder(self) -> ConsoleLogSettingsBuilder
Set specific ConsoleLogSettings
.
Sourcepub fn file_log_settings_builder(
self,
path: impl AsRef<Path>,
filename_suffix: impl Into<String>,
) -> FileLogSettingsBuilder
pub fn file_log_settings_builder( self, path: impl AsRef<Path>, filename_suffix: impl Into<String>, ) -> FileLogSettingsBuilder
Set specific FileLogSettings
.
Sourcepub fn otlp_log_settings_builder(self) -> OtlpLogSettingsBuilder
pub fn otlp_log_settings_builder(self) -> OtlpLogSettingsBuilder
Set specific OtlpLogSettings
.
Sourcepub fn otlp_trace_settings_builder(self) -> OtlpTraceSettingsBuilder
pub fn otlp_trace_settings_builder(self) -> OtlpTraceSettingsBuilder
Set specific OtlpTraceSettings
.
Trait Implementations§
Source§impl Default for SettingsBuilder
impl Default for SettingsBuilder
Source§impl From<SettingsBuilder> for ConsoleLogSettingsBuilder
This implementation is used to turn the common settings builder into the console log specific
settings builder via the SettingsBuilder::console_log_settings_builder
function.
impl From<SettingsBuilder> for ConsoleLogSettingsBuilder
This implementation is used to turn the common settings builder into the console log specific
settings builder via the SettingsBuilder::console_log_settings_builder
function.
Source§fn from(value: SettingsBuilder) -> Self
fn from(value: SettingsBuilder) -> Self
Source§impl From<SettingsBuilder> for OtlpLogSettingsBuilder
This implementation is used to turn the common settings builder into the OTLP log specific
settings builder via the SettingsBuilder::otlp_log_settings_builder
function.
impl From<SettingsBuilder> for OtlpLogSettingsBuilder
This implementation is used to turn the common settings builder into the OTLP log specific
settings builder via the SettingsBuilder::otlp_log_settings_builder
function.
Source§fn from(value: SettingsBuilder) -> Self
fn from(value: SettingsBuilder) -> Self
Source§impl From<SettingsBuilder> for OtlpTraceSettingsBuilder
This implementation is used to turn the common settings builder into the OTLP trace specific
settings builder via the SettingsBuilder::otlp_trace_settings_builder
function.
impl From<SettingsBuilder> for OtlpTraceSettingsBuilder
This implementation is used to turn the common settings builder into the OTLP trace specific
settings builder via the SettingsBuilder::otlp_trace_settings_builder
function.
Source§fn from(value: SettingsBuilder) -> Self
fn from(value: SettingsBuilder) -> Self
Auto Trait Implementations§
impl Freeze for SettingsBuilder
impl RefUnwindSafe for SettingsBuilder
impl Send for SettingsBuilder
impl Sync for SettingsBuilder
impl Unpin for SettingsBuilder
impl UnwindSafe for SettingsBuilder
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> 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>
T
in a tonic::Request