From 899d520cd784fdd75228e520c8171f695876866b Mon Sep 17 00:00:00 2001 From: Vesa Meskanen Date: Wed, 24 Feb 2016 11:50:03 +0200 Subject: [PATCH] Debug log full queries and responses between Pelias and Elasticsearch --- controller/search.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controller/search.js b/controller/search.js index 309e7647..9fafdd20 100644 --- a/controller/search.js +++ b/controller/search.js @@ -30,6 +30,8 @@ function setup( backend, query ){ cmd.type = req.clean.type; } + logger.debug( '[ES req]', JSON.stringify(cmd) ); + // query backend service.search( backend, cmd, function( err, docs, meta ){ @@ -42,7 +44,7 @@ function setup( backend, query ){ res.data = docs; res.meta = meta; } - + logger.debug('[ES response]', JSON.stringify(docs)); next(); });