Struct env_logger::Env [−][src]
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
impl<'a> Env<'a>
[src]
pub fn new() -> Self
[src]
Get a default set of environment variables.
pub fn filter<E>(self, filter_env: E) -> Self where
E: Into<Cow<'a, str>>,
[src]
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]
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 default_filter_or<V>(self, default: V) -> Self where
V: Into<Cow<'a, str>>,
[src]
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.
pub fn write_style<E>(self, write_style_env: E) -> Self where
E: Into<Cow<'a, str>>,
[src]
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]
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.
pub fn default_write_style_or<V>(self, default: V) -> Self where
V: Into<Cow<'a, str>>,
[src]
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.
Trait Implementations
impl<'a> Debug for Env<'a>
[src]
impl<'a> Default for Env<'a>
[src]
impl<'a, T> From<T> for Env<'a> where
T: Into<Cow<'a, str>>,
[src]
T: Into<Cow<'a, str>>,
Auto Trait Implementations
impl<'a> RefUnwindSafe for Env<'a>
impl<'a> Send for Env<'a>
impl<'a> Sync for Env<'a>
impl<'a> Unpin for Env<'a>
impl<'a> UnwindSafe for Env<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,