Enum sloggers::LoggerConfig[][src]

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

The configuration of LoggerBuilder.

Examples

Null logger.

extern crate sloggers;
extern crate serdeconv;

use sloggers::LoggerConfig;

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

Terminal logger.

extern crate sloggers;
extern crate serdeconv;

use sloggers::LoggerConfig;

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

File logger.

extern crate sloggers;
extern crate serdeconv;

use sloggers::LoggerConfig;

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

Variants

Methods

impl LoggerConfig
[src]

Sets the log level of this logger.

Trait Implementations

impl Debug for LoggerConfig
[src]

Formats the value using the given formatter. Read more

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.

Builds a logger with this configuration.

impl Default for LoggerConfig
[src]

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

Auto Trait Implementations