From 013069b6868d0da02303a6d7fce7c3f266948af9 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Wed, 5 Jul 2017 09:39:32 -0700 Subject: [PATCH] updated logging on serves --- routes/serve-routes.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/routes/serve-routes.js b/routes/serve-routes.js index 7cc46c28..d81cc818 100644 --- a/routes/serve-routes.js +++ b/routes/serve-routes.js @@ -33,6 +33,7 @@ function serveFile ({ fileName, fileType, filePath }, res) { } function sendAnalyticsAndLog (headers, ip, originalUrl) { + logger.verbose('headers', headers); // google analytics sendGoogleAnalytics('serve', headers, ip, originalUrl); // logging @@ -41,12 +42,7 @@ function sendAnalyticsAndLog (headers, ip, originalUrl) { module.exports = (app) => { // route to fetch one free public claim - app.get('/:name/:claim_id', ({ headers, ip, ips, originalUrl, params }, res) => { - logger.verbose('ip', ip); - logger.verbose('ips', ips); - logger.verbose('headers', headers); - logger.verbose('user-agent', headers['user-agent']); - logger.verbose('accept-language', headers['accept-language']); + app.get('/:name/:claim_id', ({ headers, ip, originalUrl, params }, res) => { sendAnalyticsAndLog(headers, ip, originalUrl); // begin image-serve processes serveController