cti-restify-after-request-error-logger
v1.0.0
Published
Logs the errors of a restify request
Downloads
2
Readme
cti-restify-after-request-error-logger
Middleware for logging the request errors.
Usage
const afterRequestErrorLogger = require( 'cti-restify-after-request-error-logger' );
const bunyan = require( 'bunyan' );
const restify = require( 'restify );
const log = bunyan.createLogger( { name: 'example' } );
const server = restify.createServer();
server.on( 'after', afterRequestErrorLogger( { log } ) );