[][src]Struct spirit_log::Cfg

pub struct Cfg(_);

A configuration fragment to set up logging.

By flattening this into the configuration structure, the program can load options for configuring logging. It adds a new top-level array logging. Each item describes one logger, with separate log levels and destination.

See the crate examples for the use.

Logger options

These are valid for all loggers:

The allowed types are:

Implementations

impl Cfg[src]

pub fn init_extension<E: Extensible>() -> impl Extension<E>[src]

This provides an Extension to initialize logging.

It calls init and sets up a basic logger (WARN and more serious going to stderr).

This is seldom used directly (but can be), the LogInstaller makes sure it is called.

pub fn is_empty(&self) -> bool[src]

Checks if the logging configuration is empty.

Can be used for skipping serialization of the config array if empty.

Trait Implementations

impl Clone for Cfg[src]

impl Debug for Cfg[src]

impl Default for Cfg[src]

impl<'de> Deserialize<'de> for Cfg[src]

impl Fragment for Cfg[src]

type Driver = TrivialDriver

The default driver to be used by the fragment. Read more

type Seed = ()

The intermediate product if the fragment supports two-stage creation of Resources. If not, it can be set to (). Read more

type Resource = Dispatch

The actual product this Fragment creates.

type Installer = LogInstaller

The default installer to be used unless a transformation or the user doesn't provide one. Read more

impl Serialize for Cfg[src]

impl StructDoc for Cfg[src]

Auto Trait Implementations

impl RefUnwindSafe for Cfg

impl Send for Cfg

impl Sync for Cfg

impl Unpin for Cfg

impl UnwindSafe for Cfg

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoResult<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.