Struct env_logger::Env [−][src]
pub struct Env<'a> { /* fields omitted */ }
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
.
Methods
impl<'a> Env<'a>
[src]
impl<'a> Env<'a>
pub fn new() -> Self
[src]
pub fn new() -> Self
Get a default set of environment variables.
pub fn filter<E>(self, filter_env: E) -> Self where
E: Into<Cow<'a, str>>,
[src]
pub fn filter<E>(self, filter_env: E) -> Self where
E: Into<Cow<'a, str>>,
Specify an environment variable to read the filter from.
pub fn filter_or<E, V>(self, filter_env: E, default: V) -> Self where
E: Into<Cow<'a, str>>,
V: Into<Cow<'a, str>>,
[src]
pub fn filter_or<E, V>(self, filter_env: E, default: V) -> Self where
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.
pub fn write_style<E>(self, write_style_env: E) -> Self where
E: Into<Cow<'a, str>>,
[src]
pub fn write_style<E>(self, write_style_env: E) -> Self where
E: Into<Cow<'a, str>>,
Specify an environment variable to read the style from.
pub fn write_style_or<E, V>(self, write_style_env: E, default: V) -> Self where
E: Into<Cow<'a, str>>,
V: Into<Cow<'a, str>>,
[src]
pub fn write_style_or<E, V>(self, write_style_env: E, default: V) -> Self where
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.
Trait Implementations
impl<'a> Debug for Env<'a>
[src]
impl<'a> Debug for Env<'a>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a, T> From<T> for Env<'a> where
T: Into<Cow<'a, str>>,
[src]
impl<'a, T> From<T> for Env<'a> where
T: Into<Cow<'a, str>>,
impl<'a> Default for Env<'a>
[src]
impl<'a> Default for Env<'a>