Lines Matching refs:Env

259 //! If these variables aren't present, the default value to use can be tweaked with the [`Env`] type.
264 //! use env_logger::Env;
266 //! env_logger::Builder::from_env(Env::default().default_filter_or("warn")).init();
274 //! [`Env`]: struct.Env.html
310 /// By default, the `Env` will read the following environment variables:
315 /// These sources can be configured using the builder methods on `Env`.
317 pub struct Env<'a> {
436 /// use env_logger::{Builder, Env};
438 /// let env = Env::new().filter("MY_LOG").write_style("MY_LOG_STYLE");
445 E: Into<Env<'a>>,
479 /// use env_logger::{Builder, Env};
481 /// let env = Env::new().filter("MY_LOG").write_style("MY_LOG_STYLE");
490 E: Into<Env<'a>>,
507 /// This method is a convenient way to call `from_env(Env::default())` without
508 /// having to use the `Env` type explicitly. The builder will use the
522 /// [default environment variables]: struct.Env.html#default-environment-variables
524 Self::from_env(Env::default())
529 /// This method is a convenient way to call `parse_env(Env::default())` without
530 /// having to use the `Env` type explicitly. The builder will use the
548 /// [default environment variables]: struct.Env.html#default-environment-variables
550 self.parse_env(Env::default())
723 /// Env logger can log to either stdout, stderr or a custom pipe. The default is stderr.
856 /// use env_logger::{Logger, Env};
858 /// let env = Env::new().filter_or("MY_LOG", "info").write_style_or("MY_LOG_STYLE", "always");
864 E: Into<Env<'a>>,
871 /// This method is a convenient way to call `from_env(Env::default())` without
872 /// having to use the `Env` type explicitly. The logger will use the
885 /// [default environment variables]: struct.Env.html#default-environment-variables
973 impl<'a> Env<'a> {
1087 impl<'a, T> From<T> for Env<'a>
1092 Env::default().filter(filter_env.into())
1096 impl<'a> Default for Env<'a> {
1098 Env {
1141 try_init_from_env(Env::default())
1169 /// use env_logger::{Builder, Env};
1172 /// let env = Env::new().filter("MY_LOG").write_style("MY_LOG_STYLE");
1187 E: Into<Env<'a>>,
1206 /// use env_logger::{Builder, Env};
1208 /// let env = Env::new().filter("MY_LOG").write_style("MY_LOG_STYLE");
1219 E: Into<Env<'a>>,
1244 E: Into<Env<'a>>,
1257 let env = Env::new().filter_or("env_get_filter_reads_from_var_if_set", "from default");
1266 let env = Env::new().filter_or(
1279 Env::new().write_style_or("env_get_write_style_reads_from_var_if_set", "from default");
1288 let env = Env::new().write_style_or(
1302 let env = Env::new().filter("builder_parse_default_env_overrides_existing_filters");