[][src]Struct slog_env_cfg::Config

pub struct Config {
    pub format: LogFormat,
    pub disable_env_logger: bool,
    pub env_logger_filters: Option<String>,
    pub env_logger_override_default_filter: Option<String>,
}

Holds the configuration parameters. Used to build Drains.

Fields

format: LogFormat

Log format to provide.

disable_env_logger: bool

Disable env logger. You might want this for performance reasons or just for convenience: env logger hides log values by default, and turning the whole env logger off is a simple wordaround for that behavior.

env_logger_filters: Option<String>

Env Logger configuration to use (usually passed via RUST_LOG env var).

env_logger_override_default_filter: Option<String>

If no configuration is passed to env logger, it adds the "error" filter by default. This allows for overriding this default with something more suitable.

Methods

impl Config[src]

pub fn build(&self) -> impl SendSyncRefUnwindSafeDrain<Ok = (), Err = Never>[src]

Build a Drain according to the specified parameters. The resulting Drain is ready to use with slog::Logger::root.

Trait Implementations

impl Clone for Config[src]

impl PartialEq<Config> for Config[src]

impl Debug for Config[src]

Auto Trait Implementations

impl Send for Config

impl Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

impl RefUnwindSafe for Config

Blanket Implementations

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

impl<T> From<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.

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

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

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

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]