Browse Source

Merge pull request #417 from vesameskanen/log-queries

Debug log full queries and responses between Pelias and Elasticsearch
pull/320/merge
Julian Simioni 9 years ago
parent
commit
06e412776e
  1. 4
      controller/search.js

4
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();
});

Loading…
Cancel
Save