From 187644e178a13abe28689de54abee4926910fae1 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 20 Feb 2018 12:53:51 -0800 Subject: [PATCH] update logger doc string --- src/middleware/logger.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/middleware/logger.rs b/src/middleware/logger.rs index 898aa0e0..ac9aac92 100644 --- a/src/middleware/logger.rs +++ b/src/middleware/logger.rs @@ -13,6 +13,9 @@ use httpresponse::HttpResponse; use middleware::{Middleware, Started, Finished}; /// `Middleware` for logging request and response info to the terminal. +/// `Logger` middleware uses standard log crate to log information. You should +/// enable logger for *actix_web* package to see access log. +/// ([env_logger](https://docs.rs/env_logger/*/env_logger/) or similar) /// /// ## Usage /// @@ -24,10 +27,14 @@ use middleware::{Middleware, Started, Finished}; /// ``` /// ```rust /// # extern crate actix_web; +/// extern crate env_logger; /// use actix_web::Application; /// use actix_web::middleware::Logger; /// /// fn main() { +/// std::env::set_var("RUST_LOG", "actix_web=info"); +/// env_logger::init(); +/// /// let app = Application::new() /// .middleware(Logger::default()) /// .middleware(Logger::new("%a %{User-Agent}i"))