1
0
mirror of https://github.com/jht5945/rust_util.git synced 2025-12-27 07:30:05 +08:00

chore: example and readme

This commit is contained in:
2020-11-29 12:05:13 +08:00
parent 6881cebf72
commit 0c38427bcb
2 changed files with 28 additions and 0 deletions

View File

@@ -2,5 +2,17 @@
// cargo run --example log
fn main() {
std::env::set_var("LOGGER_LEVEL", "*");
println!(r##"env LOGGER_LEVEL set to:
debug or *
info or ? -- default
ok or #
warn or !
error or ^"##);
debugging!("Hello {}", "world!");
information!("Hello {}", "world!");
success!("Hello {}", "world!");
warning!("Hello {}", "world!");
failure!("Hello {}", "world!");
}