Struct spirit_log::Extras

source ·
pub struct Extras<O, C> { /* private fields */ }
Expand description

Description of extra configuration for logging.

This allows customizing the logging as managed by this crate, mostly by pairing it with command line options (see Opts) and adding arbitrary additional loggers.

The default does nothing (eg. no command line options and no extra loggers).

Implementations§

Constructs the Extras structure with an extractor for options.

The passed closure should take the applications global options structure and return the Opts by which the logging from command line can be tweaked.

Modifies the Extras to contain another source of additional loggers.

Each such closure is run every time logging is being configured. It can return either bunch of loggers (with the needed log level), or an error. If an error is returned, the loading of new configuration is aborted.

Trait Implementations§

Perform the creation and application of the helper. Read more
Returns the “default value” for a type. Read more

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.