Struct wick_logger::FilterOptions
source · #[non_exhaustive]pub struct FilterOptions {
pub level: LogLevel,
pub filter: Vec<TargetLevel>,
}
Expand description
Options for filtering logs.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.level: LogLevel
The default log level for anything that does not match an include or exclude filter.
filter: Vec<TargetLevel>
The targets and their log levels.
Implementations§
source§impl FilterOptions
impl FilterOptions
sourcepub fn new(level: LogLevel, filter: Vec<TargetLevel>) -> Self
pub fn new(level: LogLevel, filter: Vec<TargetLevel>) -> Self
Create a new instance with the given log level.
Trait Implementations§
source§impl Clone for FilterOptions
impl Clone for FilterOptions
source§fn clone(&self) -> FilterOptions
fn clone(&self) -> FilterOptions
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 FilterOptions
impl Debug for FilterOptions
source§impl Default for FilterOptions
impl Default for FilterOptions
source§impl<S> Filter<S> for FilterOptionswhere
S: Subscriber + for<'lookup> LookupSpan<'lookup>,
impl<S> Filter<S> for FilterOptionswhere S: Subscriber + for<'lookup> LookupSpan<'lookup>,
source§fn enabled(&self, metadata: &Metadata<'_>, _cx: &Context<'_, S>) -> bool
fn enabled(&self, metadata: &Metadata<'_>, _cx: &Context<'_, S>) -> bool
Returns
true
if this layer is interested in a span or event with the
given Metadata
in the current Context
, similarly to
Subscriber::enabled
. Read moresource§fn event_enabled(&self, event: &Event<'_>, _cx: &Context<'_, S>) -> bool
fn event_enabled(&self, event: &Event<'_>, _cx: &Context<'_, S>) -> bool
Called before the filtered [
Layer]'s [
on_event], to determine if
on_event` should be called. Read moresource§fn callsite_enabled(&self, meta: &'static Metadata<'static>) -> Interest
fn callsite_enabled(&self, meta: &'static Metadata<'static>) -> Interest
source§fn max_level_hint(&self) -> Option<LevelFilter>
fn max_level_hint(&self) -> Option<LevelFilter>
source§fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)
source§fn on_enter(&self, id: &Id, ctx: Context<'_, S>)
fn on_enter(&self, id: &Id, ctx: Context<'_, S>)
Notifies this filter that a span with the given ID was entered. Read more
Auto Trait Implementations§
impl RefUnwindSafe for FilterOptions
impl Send for FilterOptions
impl Sync for FilterOptions
impl Unpin for FilterOptions
impl UnwindSafe for FilterOptions
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<F, S> FilterExt<S> for Fwhere
F: Filter<S>,
impl<F, S> FilterExt<S> for Fwhere F: Filter<S>,
§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>
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> 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