Browse Source

Add query/response logging in debug mode to place controller, too

pull/422/head
Vesa Meskanen 9 years ago
parent
commit
269dff9dd1
  1. 4
      controller/place.js

4
controller/place.js

@ -1,4 +1,5 @@
var service = { mget: require('../service/mget') }; var service = { mget: require('../service/mget') };
var logger = require('pelias-logger').get('api:controller:place');
function setup( backend ){ function setup( backend ){
@ -46,6 +47,8 @@ function setup( backend ){
}; };
}); });
logger.debug( '[ES req]', JSON.stringify(query) );
service.mget( backend, query, function( err, docs ) { service.mget( backend, query, function( err, docs ) {
// error handler // error handler
@ -56,6 +59,7 @@ function setup( backend ){
else { else {
res.data = docs; res.data = docs;
} }
logger.debug('[ES response]', JSON.stringify(docs));
next(); next();
}); });

Loading…
Cancel
Save