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.
RequestLogger
plugin does not log each request. It extends the.log
property of thereq
:You have to register your own logger first, e.g.
Making a few requests to the
/ping
endpoint will produce the following logs:Notice the "req_id" property.
The equivalent requests without the
requestLogger
codewill produce the following logs:
If your intention is to log every single request, then ditch
in favour of:
This will produce logs: