rust-cli / env_logger

A logging implementation for `log` which is configured via an environment variable.
https://docs.rs/env_logger
Apache License 2.0
803 stars 125 forks source link

Update example code to run inside `main` #328

Open keoghpe opened 1 month ago

keoghpe commented 1 month ago

Small docs change - I'm new to this crate and found the current docs page confusing as it calls init outside a main function. Hopefully this makes it clearer!

Thanks for creating a cool crate ❤️

epage commented 1 month ago

I'm mixed on this. This makes the intent even more explicit. On the other hand, its not very idiomatic these days to have main in doc tests.