webappengine
Version:
A web application platform that can host multiple web apps running with Node.js.
20 lines (18 loc) • 344 B
JavaScript
/**
* err_log:
*
* Write request and error information to stderr, loggly, or similar services.
*
* Examples:
*
* app.use(middleware.err_log())
*
* @return {Function}
* @api public
*/
module.exports = function err_log() {
return function(err, req, res, next) {
console.error(err.stack);
next(err);
};
};