From 1be9ccae8e5d1a7e82b90fe401c495d620495b7e Mon Sep 17 00:00:00 2001 From: Adam Zielinski Date: Tue, 5 Mar 2019 22:55:50 -0500 Subject: [PATCH] pass context Keys to LogFormatterParams --- logger.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/logger.go b/logger.go index e8237bf4..2ecaed7d 100644 --- a/logger.go +++ b/logger.go @@ -66,8 +66,8 @@ type LogFormatterParams struct { IsTerm bool // BodySize is the size of the Response Body BodySize int - // Context is the Context associated with the request. - Context *Context + // Keys are the keys set on the request's context. + Keys map[string]interface{} } // StatusCodeColor is the ANSI color for appropriately logging http status code to a terminal. @@ -229,7 +229,7 @@ func LoggerWithConfig(conf LoggerConfig) HandlerFunc { param := LogFormatterParams{ Request: c.Request, IsTerm: isTerm, - Context: c, + Keys: c.Keys, } // Stop timer