diff options
Diffstat (limited to 'vendor/env_logger-0.7.1/examples/filters_from_code.rs')
-rw-r--r-- | vendor/env_logger-0.7.1/examples/filters_from_code.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/vendor/env_logger-0.7.1/examples/filters_from_code.rs b/vendor/env_logger-0.7.1/examples/filters_from_code.rs new file mode 100644 index 000000000..4137c9189 --- /dev/null +++ b/vendor/env_logger-0.7.1/examples/filters_from_code.rs @@ -0,0 +1,18 @@ +/*! +Specify logging filters in code instead of using an environment variable. +*/ + +#[macro_use] +extern crate log; + +fn main() { + env_logger::builder() + .filter_level(log::LevelFilter::Trace) + .init(); + + trace!("some trace log"); + debug!("some debug log"); + info!("some information log"); + warn!("some warning log"); + error!("some error log"); +} |