- trace
- debug
- info
- warn
- error
Rocket - Logging to the console
examples/rocket/logging/src/main.rs
#[macro_use] extern crate rocket; #[get("/")] fn index() -> &'static str { rocket::trace!("Trace from Hello World"); rocket::debug!("Debug from Hello World"); rocket::info!("Info from Hello World"); rocket::warn!("Warning from Hello World"); rocket::error!("Error from Hello World"); "Hello, world!" } #[launch] fn rocket() -> _ { rocket::build().mount("/", routes![index]) }
examples/rocket/logging/Rocket.toml
[debug] # `critical`, `normal`, `debug`, `off` #log_level = "normal" #log_level = "debug"