diff --git a/Readme.md b/Readme.md index df7eca5..1ece9db 100644 --- a/Readme.md +++ b/Readme.md @@ -336,8 +336,8 @@ app.use(expressWinston.logger({ transports: [new LoggingWinston({})], metaField: null, //this causes the metadata to be stored at the root of the log entry responseField: null, // this prevents the response from being included in the metadata (including body and status code) - requestWhitelist: ["headers", "query"], //these are not included in the standard StackDriver httpRequest - responseWhitelist: ["body"], // this populates the `res.body` so we can get the response size (not required) + requestWhitelist: ['headers', 'query'], //these are not included in the standard StackDriver httpRequest + responseWhitelist: ['body'], // this populates the `res.body` so we can get the response size (not required) dynamicMeta: (req, res) => { const httpRequest = {} const meta = {} @@ -349,8 +349,8 @@ app.use(expressWinston.logger({ // httpRequest.remoteIp = req.ip // this includes both ipv6 and ipv4 addresses separated by ':' httpRequest.remoteIp = req.ip.indexOf(':') >= 0 ? req.ip.substring(req.ip.lastIndexOf(':') + 1) : req.ip // just ipv4 httpRequest.requestSize = req.socket.bytesRead - httpRequest.userAgent = req.get("User-Agent") - httpRequest.referrer = req.get("Referrer") + httpRequest.userAgent = req.get('User-Agent') + httpRequest.referrer = req.get('Referrer') } if (res) { @@ -361,9 +361,9 @@ app.use(expressWinston.logger({ nanos: ( res.responseTime % 1000 ) * 1000000 } if (res.body) { - if (typeof res.body === "object") { + if (typeof res.body === 'object') { httpRequest.responseSize = JSON.stringify(res.body).length - } else if (typeof res.body === "string") { + } else if (typeof res.body === 'string') { httpRequest.responseSize = res.body.length } } @@ -371,7 +371,6 @@ app.use(expressWinston.logger({ return meta } })); - ``` ## Global Whitelists and Blacklists