Struct bdrck::logging::LogFilters

source ·
pub struct LogFilters(pub Vec<LogFilter>);
Expand description

LogFilters is a structure which defines the full set of filters a Logger should apply to log messages before actually outputting them.

Tuple Fields

0: Vec<LogFilter>

Implementations

Returns the LevelFilter which should be applied to the given module. If no LogFilter entries apply to the given module, Trace is returned instead, since logging messages are enabled by default in this library. If multiple LevelFilters matched the given module, then the lowest (i.e., most restrictive) LevelFilter is returned.

Trait Implementations

Parse a set of log filters from a string.

We assume that the regex contained in log filters will only contain certain characters: those which can appear in valid module names (something like [A-Za-z_][A-Za-z0-9_]* separated by :’s), and maybe some modifiers or etc., like *+?|(){}[].

But, we want a string to contain several filters. So, using the above assumption about what characters will appear in the regex, we’ll use the ; character as a separator. So, the final format is:

regex=level;regex=level;…

The associated error which can be returned from parsing.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.