[−][src]Struct tracing_fmt::filter::EnvFilter
A Layer
which filters spans and events based on a set of filter
directives.
Methods
impl Filter
[src]
pub const DEFAULT_ENV: &'static str
[src]
The default environment variable used by Filter::from_default_env
and Filter::try_from_default_env
.
pub fn from_default_env() -> Filter
[src]
Returns a new Filter
from the value of the RUST_LOG
environment
variable, ignoring any invalid filter directives.
pub fn from_env<A>(env: A) -> Filter where
A: AsRef<str>,
[src]
A: AsRef<str>,
Returns a new Filter
from the value of the given environment
variable, ignoring any invalid filter directives.
pub fn new<S>(dirs: S) -> Filter where
S: AsRef<str>,
[src]
S: AsRef<str>,
Returns a new Filter
from the directives in the given string,
ignoring any that are invalid.
pub fn try_new<S>(dirs: S) -> Result<Filter, ParseError> where
S: AsRef<str>,
[src]
S: AsRef<str>,
Returns a new Filter
from the directives in the given string,
or an error if any are invalid.
pub fn try_from_default_env() -> Result<Filter, FromEnvError>
[src]
Returns a new Filter
from the value of the RUST_LOG
environment
variable, or an error if the environment variable contains any invalid
filter directives.
pub fn try_from_env<A>(env: A) -> Result<Filter, FromEnvError> where
A: AsRef<str>,
[src]
A: AsRef<str>,
Returns a new Filter
from the value of the given environment
variable, or an error if the environment variable is unset or contains
any invalid filter directives.
Trait Implementations
impl FromStr for Filter
[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(spec: &str) -> Result<Filter, <Filter as FromStr>::Err>
[src]
impl Debug for Filter
[src]
impl<S> Layer<S> for Filter where
S: Subscriber,
[src]
S: Subscriber,
fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest
[src]
fn enabled(&self, metadata: &Metadata, Context<S>) -> bool
[src]
fn new_span(&self, attrs: &Attributes, id: &Id, Context<S>)
[src]
fn on_record(&self, id: &Id, values: &Record, Context<S>)
[src]
fn on_enter(&self, id: &Id, Context<S>)
[src]
fn on_exit(&self, id: &Id, Context<S>)
[src]
fn on_close(&self, id: Id, Context<S>)
[src]
fn on_follows_from(&self, _span: &Id, _follows: &Id, _ctx: Context<S>)
[src]
Notifies this layer that a span with the ID span
recorded that it follows from the span with the ID follows
. Read more
fn on_event(&self, _event: &Event, _ctx: Context<S>)
[src]
Notifies this layer that an event has occurred.
fn on_id_change(&self, _old: &Id, _new: &Id, _ctx: Context<S>)
[src]
Notifies this layer that a span ID has been cloned, and that the subscriber returned a different ID. Read more
fn and_then<L>(self, layer: L) -> Layered<L, Self, S> where
L: Layer<S>,
[src]
L: Layer<S>,
Composes this layer around the given Layer
, returning a Layered
struct implementing Layer
. Read more
fn with_subscriber(self, inner: S) -> Layered<Self, S, S>
[src]
Composes this Layer
with the given [Subscriber
], returning a Layered
struct that implements [Subscriber
]. Read more
impl Default for Filter
[src]
impl<S> From<S> for Filter where
S: AsRef<str>,
[src]
S: AsRef<str>,
Auto Trait Implementations
impl Send for Filter
impl Unpin for Filter
impl Sync for Filter
impl UnwindSafe for Filter
impl RefUnwindSafe for Filter
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,