Browse Source

add controller logging

pull/761/head
Diana Shkolnikov 8 years ago
parent
commit
ec91f4055f
  1. 3
      controller/search.js

3
controller/search.js

@ -64,6 +64,9 @@ function setup( config, backend, query ){
res.meta = meta || {}; res.meta = meta || {};
// store the query_type for subsequent middleware // store the query_type for subsequent middleware
res.meta.query_type = renderedQuery.type; 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); logger.debug('[ES response]', docs);
next(); next();

Loading…
Cancel
Save