From 605cd7c540e196efa50d3e96e9ed3f32b556dd03 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Tue, 1 Aug 2023 18:06:59 +0100 Subject: [PATCH] add startup logging to basic example --- actix-web/examples/basic.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actix-web/examples/basic.rs b/actix-web/examples/basic.rs index 60715f477..b8bc09821 100644 --- a/actix-web/examples/basic.rs +++ b/actix-web/examples/basic.rs @@ -1,5 +1,3 @@ -#![allow(clippy::uninlined_format_args)] - use actix_web::{get, middleware, web, App, HttpRequest, HttpResponse, HttpServer}; #[get("/resource1/{name}/index.html")] @@ -22,6 +20,8 @@ async fn no_params() -> &'static str { async fn main() -> std::io::Result<()> { env_logger::init_from_env(env_logger::Env::new().default_filter_or("info")); + log::info!("starting HTTP server at http://localhost:8080"); + HttpServer::new(|| { App::new() .wrap(middleware::DefaultHeaders::new().add(("X-Version", "0.2")))