1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 08:22:59 +01:00

update logger doc string

This commit is contained in:
Nikolay Kim 2018-02-20 12:53:51 -08:00
parent 7198dde465
commit 187644e178

View File

@ -13,6 +13,9 @@ use httpresponse::HttpResponse;
use middleware::{Middleware, Started, Finished}; use middleware::{Middleware, Started, Finished};
/// `Middleware` for logging request and response info to the terminal. /// `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 /// ## Usage
/// ///
@ -24,10 +27,14 @@ use middleware::{Middleware, Started, Finished};
/// ``` /// ```
/// ```rust /// ```rust
/// # extern crate actix_web; /// # extern crate actix_web;
/// extern crate env_logger;
/// use actix_web::Application; /// use actix_web::Application;
/// use actix_web::middleware::Logger; /// use actix_web::middleware::Logger;
/// ///
/// fn main() { /// fn main() {
/// std::env::set_var("RUST_LOG", "actix_web=info");
/// env_logger::init();
///
/// let app = Application::new() /// let app = Application::new()
/// .middleware(Logger::default()) /// .middleware(Logger::default())
/// .middleware(Logger::new("%a %{User-Agent}i")) /// .middleware(Logger::new("%a %{User-Agent}i"))