[−][src]Crate slog_env_cfg
Example
// Read configuration from environment. let cfg = slog_env_cfg::config_from_env()?; // Build an slog drain using the provided configuration. let drain = cfg.build(); // Use the darin to create the logger as usual. let root = slog::Logger::root(drain, o!()); // Log something! info!(root, "formatted: {}", 1; "log-key" => true);
Structs
Config | Holds the configuration parameters.
Used to build |
Enums
LogFormat | Supported log formats. |
Traits
Drain | Logging drain |
Functions
config_from_env | Build Config from env vars. |
log_format_from_env | Build LogFormat from env vars. |
Type Definitions
Result | This crate's Result type alias. |