How to use log crate in Rust logging facade

Add log and env_logger to Cargo.toml, initialize the backend in main, and use log macros to output messages.

Add the log and a backend like env_logger to your Cargo.toml, initialize the logger in main, then use macros like info! to log messages.

[dependencies]
log = "0.4"
env_logger = "0.11"
use log::{info, LevelFilter};

fn main() {
    env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info"))
        .format_timestamp(None)
        .init();

    info!("Application started");
}