Struct spirit_log::Extras[][src]

pub struct Extras<O, C> { /* fields omitted */ }

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).

Methods

impl<O, C> Extras<O, C>
[src]

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

impl<O, C> Default for Extras<O, C>
[src]

Returns the "default value" for a type. Read more

impl<O, C> CfgHelper<O, C, Extras<O, C>> for Cfg where
    C: DeserializeOwned + Send + Sync + 'static,
    O: Debug + StructOpt + Sync + Send + 'static, 
[src]

Perform the creation and application of the helper. Read more

Auto Trait Implementations

impl<O, C> Send for Extras<O, C>

impl<O, C> Sync for Extras<O, C>