From 63d70701e0e6a5c2842e0ac18774abfa5c2fd24e Mon Sep 17 00:00:00 2001 From: Jacky Wu Date: Mon, 10 May 2021 17:31:54 +0800 Subject: [PATCH] fix: correct my_errors log print issue. (#229) --- examples/errors/src/logging.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/errors/src/logging.rs b/examples/errors/src/logging.rs index e7a26f3..0bb912c 100644 --- a/examples/errors/src/logging.rs +++ b/examples/errors/src/logging.rs @@ -1,7 +1,7 @@ // use actix_web::{error, get, middleware::Logger, App, HttpServer, Result}; use derive_more::{Display, Error}; -use log::debug; +use log::info; #[derive(Debug, Display, Error)] #[display(fmt = "my error: {}", name)] @@ -15,14 +15,14 @@ impl error::ResponseError for MyError {} #[get("/")] async fn index() -> Result<&'static str, MyError> { let err = MyError { name: "test error" }; - debug!("{}", err); + info!("{}", err); Err(err) } #[rustfmt::skip] #[actix_web::main] async fn main() -> std::io::Result<()> { - std::env::set_var("RUST_LOG", "my_errors=debug,actix_web=info"); + std::env::set_var("RUST_LOG", "info"); std::env::set_var("RUST_BACKTRACE", "1"); env_logger::init();