From a4a6a691c8f16a83a418362d4e8a4b2dbbe63742 Mon Sep 17 00:00:00 2001 From: Stephen Hess Date: Thu, 19 Jan 2017 17:08:48 -0500 Subject: [PATCH] cleaned up log message parts --- controller/search.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/controller/search.js b/controller/search.js index 08f2731a..4870f53a 100644 --- a/controller/search.js +++ b/controller/search.js @@ -93,8 +93,13 @@ function setup( apiConfig, esclient, query ){ // store the query_type for subsequent middleware res.meta.query_type = renderedQuery.type; - logger.info(`[controller:search] [queryType:${renderedQuery.type}] [es_result_count:` + - _.get(res, 'data', []).length + ']'); + const messageParts = [ + '[controller:search]', + `[queryType:${renderedQuery.type}]`, + `[es_result_count:${_.get(res, 'data', []).length}]` + ]; + + logger.info(messageParts.join(' ')); } logger.debug('[ES response]', docs); next();