Struct env_logger::Env
source · pub struct Env<'a> { /* private fields */ }
Expand description
Set of environment variables to configure from.
Default environment variables
By default, the Env
will read the following environment variables:
RUST_LOG
: the level filterRUST_LOG_STYLE
: whether or not to print styles with records.
These sources can be configured using the builder methods on Env
.
Implementations§
source§impl<'a> Env<'a>
impl<'a> Env<'a>
sourcepub fn filter<E>(self, filter_env: E) -> Selfwhere
E: Into<Cow<'a, str>>,
pub fn filter<E>(self, filter_env: E) -> Selfwhere
E: Into<Cow<'a, str>>,
Specify an environment variable to read the filter from.
sourcepub fn filter_or<E, V>(self, filter_env: E, default: V) -> Selfwhere
E: Into<Cow<'a, str>>,
V: Into<Cow<'a, str>>,
pub fn filter_or<E, V>(self, filter_env: E, default: V) -> Selfwhere
E: Into<Cow<'a, str>>,
V: Into<Cow<'a, str>>,
Specify an environment variable to read the filter from.
If the variable is not set, the default value will be used.
sourcepub fn default_filter_or<V>(self, default: V) -> Selfwhere
V: Into<Cow<'a, str>>,
pub fn default_filter_or<V>(self, default: V) -> Selfwhere
V: Into<Cow<'a, str>>,
Use the default environment variable to read the filter from.
If the variable is not set, the default value will be used.
sourcepub fn write_style<E>(self, write_style_env: E) -> Selfwhere
E: Into<Cow<'a, str>>,
pub fn write_style<E>(self, write_style_env: E) -> Selfwhere
E: Into<Cow<'a, str>>,
Specify an environment variable to read the style from.
sourcepub fn write_style_or<E, V>(self, write_style_env: E, default: V) -> Selfwhere
E: Into<Cow<'a, str>>,
V: Into<Cow<'a, str>>,
pub fn write_style_or<E, V>(self, write_style_env: E, default: V) -> Selfwhere
E: Into<Cow<'a, str>>,
V: Into<Cow<'a, str>>,
Specify an environment variable to read the style from.
If the variable is not set, the default value will be used.
sourcepub fn default_write_style_or<V>(self, default: V) -> Selfwhere
V: Into<Cow<'a, str>>,
pub fn default_write_style_or<V>(self, default: V) -> Selfwhere
V: Into<Cow<'a, str>>,
Use the default environment variable to read the style from.
If the variable is not set, the default value will be used.