From 56b924e155b54706dd981dcc4907fd37ff871b5a Mon Sep 17 00:00:00 2001 From: Damjan Georgievski Date: Sat, 21 Jul 2018 15:15:28 +0200 Subject: [PATCH 1/2] remove the timestamp from the default logger middleware env_logger and other logging systems will (or should) already add their own timestamp. --- src/middleware/logger.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/middleware/logger.rs b/src/middleware/logger.rs index 103cbf373..b7bb1bb80 100644 --- a/src/middleware/logger.rs +++ b/src/middleware/logger.rs @@ -25,7 +25,7 @@ use middleware::{Finished, Middleware, Started}; /// default format: /// /// ```ignore -/// %a %t "%r" %s %b "%{Referer}i" "%{User-Agent}i" %T +/// %a "%r" %s %b "%{Referer}i" "%{User-Agent}i" %T /// ``` /// ```rust /// # extern crate actix_web; @@ -94,7 +94,7 @@ impl Default for Logger { /// Create `Logger` middleware with format: /// /// ```ignore - /// %a %t "%r" %s %b "%{Referer}i" "%{User-Agent}i" %T + /// %a "%r" %s %b "%{Referer}i" "%{User-Agent}i" %T /// ``` fn default() -> Logger { Logger { @@ -143,7 +143,7 @@ struct Format(Vec); impl Default for Format { /// Return the default formatting style for the `Logger`: fn default() -> Format { - Format::new(r#"%a %t "%r" %s %b "%{Referer}i" "%{User-Agent}i" %T"#) + Format::new(r#"%a "%r" %s %b "%{Referer}i" "%{User-Agent}i" %T"#) } } From 6a75a3d68339a084567c5bf62267cfd3d0daa2e9 Mon Sep 17 00:00:00 2001 From: Damjan Georgievski Date: Sat, 21 Jul 2018 16:01:42 +0200 Subject: [PATCH 2/2] document the change in the default logger --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index d83736eb5..ad06fc03c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ ### Fixed * Fixed default_resource 'not yet implemented' panic #410 +* removed the timestamp from the default logger middleware ## [0.7.0] - 2018-07-21