I am using bunyan to log restify activity.
My restify file looks something like this:
var restify = require('restify')
var bunyan = require('bunyan')
log = bunyan.createLogger({
name: 'Restify_Activity_logs',
level: 'info',
stream: process.stdout,
serializers: bunyan.stdSerializers
})
var server = restify.createServer({
log: log,
name: 'SomeName'
});
server.pre(function(req,res,next){
log.info({req:req}, 'start');
return next();
});
server.on('after', restify.auditLogger({log:log}));
The above is very standard code, however it fails to log the routes for which the request came in. What I mean is it does not log all the various routes that I have like
/users/:id/
/cars/:model/year/:year
I would like to see the above logged and not just the final URL. Any clues as to what parameters I am missing here?