From ec91f4055f12f16df9360bee64e1fae4b44a112d Mon Sep 17 00:00:00 2001 From: Diana Shkolnikov Date: Thu, 8 Dec 2016 23:35:22 -0500 Subject: [PATCH] add controller logging --- controller/search.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controller/search.js b/controller/search.js index 3ac135d4..f4aa3ab5 100644 --- a/controller/search.js +++ b/controller/search.js @@ -64,6 +64,9 @@ function setup( config, backend, query ){ res.meta = meta || {}; // store the query_type for subsequent middleware res.meta.query_type = renderedQuery.type; + + logger.info(`[controller:search] [queryType:${renderedQuery.type}] [es_result_count:` + + (res.data && res.data.length ? res.data.length : 0)); } logger.debug('[ES response]', docs); next();