Sets up a child bunyan logger with the current request id filled in, along with any other parameters you define.
server.use(restify.requestLogger());
Registering the plugin does not log requests.
Sets up a child bunyan logger with the current request id filled in, along with any other parameters you define.
server.use(restify.requestLogger());
Registering the plugin does not log requests.
RequestLoggerplugin does not log each request. It extends the.logproperty of thereq:You have to register your own logger first, e.g.
Making a few requests to the
/pingendpoint will produce the following logs:Notice the "req_id" property.
The equivalent requests without the
requestLoggercodewill produce the following logs:
If your intention is to log every single request, then ditch
in favour of:
This will produce logs: