Closed rodant closed 2 months ago
I previously used the env_logger crate for this use case. It can be initialized like this:
fn main() -> Result<()> {
env_logger::builder()
.filter_module("coordinator", log::LevelFilter::Debug) // level for the application itself
.filter_level(log::LevelFilter::Info) // level for imported crates
.init();
then we have the following macros available for logging:
error!()
warn!()
info!()
debug!()
trace!()
We need a general concept for debugging or logging at different levels: error, warning, info, etc. Let's find a good solution for that and implement it across the project.