I need to log the request Parameters that comes to LoopBack Server and Log Response Parameters that goes out of LoopBack Server.
Currently , I am able to log and get request information for remote hooks but unable to fetch response information, does any one have idea regarding this.
For Example
Claim.afterRemote('updateByClaimNumber', function (ctx, claim, next) {
var util = Claim.app.models.ModelsUtil;
util.createInvocationLogs(ctx);
next();
});
Here ctx, has the request and response but not fetching response infor like response headers, body and statuscode.
Is there any other way of getting this information, I tried creating a middle ware to get request and response but cannot get it working.