mirror of
https://github.com/jht5945/rust_util.git
synced 2025-12-27 15:40:03 +08:00
chore: example and readme
This commit is contained in:
@@ -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!");
|
||||
}
|
||||
Reference in New Issue
Block a user