pub struct LogConfig {
pub filter: String,
pub ansi: bool,
pub format: LogFormat,
pub with_target: bool,
pub include_current_span: bool,
pub include_span_list: bool,
pub span_events: LogSpanEvents,
pub service: Option<String>,
pub writer: LogWriterConfig,
pub redaction: RedactionConfig,
}Expand description
Logging configuration for rs-zero services.
Fields§
§filter: StringEnv filter directive, for example info,tower_http=debug.
ansi: boolWhether ANSI colors should be emitted for terminal writers.
format: LogFormatOutput format.
with_target: boolWhether tracing targets should be emitted.
include_current_span: boolWhether the current span should be included in JSON logs.
include_span_list: boolWhether the full span list should be included in JSON logs.
span_events: LogSpanEventsSpan lifecycle event verbosity.
service: Option<String>Optional logical service name.
writer: LogWriterConfigWriter configuration.
redaction: RedactionConfigSubscriber-layer redaction applied before records reach the writer.
Implementations§
Source§impl LogConfig
impl LogConfig
Sourcepub fn with_format(self, format: LogFormat) -> Self
pub fn with_format(self, format: LogFormat) -> Self
Sets the output format.
Sourcepub fn with_service(self, service: impl Into<String>) -> Self
pub fn with_service(self, service: impl Into<String>) -> Self
Sets the logical service name.
Sourcepub fn with_writer(self, writer: LogWriterConfig) -> Self
pub fn with_writer(self, writer: LogWriterConfig) -> Self
Sets the log writer.
Sourcepub fn with_redaction(self, redaction: RedactionConfig) -> Self
pub fn with_redaction(self, redaction: RedactionConfig) -> Self
Sets subscriber-layer redaction.
Trait Implementations§
impl Eq for LogConfig
impl StructuralPartialEq for LogConfig
Auto Trait Implementations§
impl Freeze for LogConfig
impl RefUnwindSafe for LogConfig
impl Send for LogConfig
impl Sync for LogConfig
impl Unpin for LogConfig
impl UnsafeUnpin for LogConfig
impl UnwindSafe for LogConfig
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§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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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