Enum sloggers::LoggerConfig [] [src]

pub enum LoggerConfig {
    File(FileLoggerConfig),
    Null(NullLoggerConfig),
    Terminal(TerminalLoggerConfig),
}

The configuration of LoggerBuilder.

Examples

Null logger.

use sloggers::{Config, LoggerConfig};

let toml = r#"
type = "null"
"#;
let _config = LoggerConfig::from_toml(toml).unwrap();

Terminal logger.

use sloggers::{Config, LoggerConfig};

let toml = r#"
type = "terminal"
level = "warning"
"#;
let _config = LoggerConfig::from_toml(toml).unwrap();

File logger.

use sloggers::{Config, LoggerConfig};

let toml = r#"
type = "file"
path = "/path/to/file.log"
timezone = "utc"
"#;
let _config = LoggerConfig::from_toml(toml).unwrap();

Variants

Trait Implementations

impl Debug for LoggerConfig
[src]

Formats the value using the given formatter.

impl Clone for LoggerConfig
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Config for LoggerConfig
[src]

Logger builder.

Makes a logger builder associated with this configuration.

Makes a configuration from the specified TOML file.

Makes a configuration from the TOML text.

Converts to TOML text.