[−][src]Crate slog_env_cfg
Example
// Read the configuration from environment and build a logger. let root = slog_env_cfg::logger_from_env(o!())?; // Log something! info!(root, "formatted: {}", 1; "log-key" => true);
Structs
Config | Holds the configuration parameters.
Used to build |
InvalidLogFormat | InvalidLogFormat is an error returned on a LogFormat parse attempt when an invalid logger format name is passed. |
Enums
LogFormat | Supported log formats. |
LogFormatFromEnvError | LogFormatFromEnvError captures all possible errors that can occur when log format is constructred from the system environment variables. |
LogFormatFromEnvWithDefaultError | LogFormatFromEnvWithDefaultError captures all possible errors that can occur when log format is constructred from the system environment variables with error cases handled by default assignment logic excluded. |
Constants
STANDARD_LOG_FORMAT_ENV_KEY |
Traits
SendSyncRefUnwindSafeDrain |
|
Functions
config_from_env | Build |
drain_from_env | Build slog |
log_format_from_env | Build LogFormat from env vars. |
log_format_from_env_with_default | Build LogFormat from env, or return default if the env value is not set. |
logger_from_env | Build slog |
Type Definitions
Logger |
|