Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

express-log-errors

express middleware for logging errors from routes

expressjs, express-middleware, error-log, errors, error

readme

express-log-errors

Contribute | Changelog | License

ExpressJS middleware for logging errors from route operations.

Install

npm install express-log-errors

Usage

const app = require('express')();
const logErrors = require('express-log-errors');

app.get('/test', (req, res, next) => {
    next(new Error('Test error message'));
});

app.use(logErrors());

app.listen(3000);

Maintainer

Contributors

*

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

  • Sanitize paths to prevent saving logs in dangerous places.
  • Support for deeper log paths (currently, the log path can only be one directory deep).

2.0.2 - 2018-12-12

Changed

  • Ownership of this project has been transferred to an organization in order to ease maintenance.

2.0.1 - 2018-11-27

Changed

  • We've updated the documentation in README.md to match the changed made to v2.0.0

2.0.0 - 2018-11-27

Changed

  • logErrors parameter list has been changed. You can now only define a name for the log file. See documentation.

Removed

  • Options parameter: You can no longer define options for logErrors in an object literal. Instead, use logname. See documentation.

[1.1.1] - 2018-11-27

Added

  • Secret easter-egg
  • Plans for future version regarding
    • Sanitized paths (security)
    • Posibility of defining deep log paths

[1.1.0] - 2018-11-12

Changed

  • Better logical naming of lib files

[1.0.0] - 2018-11-10

Changed

  • Internal file structure has been moved around for a more structured project.

[0.1.0] - 2018-11-10

Added

  • This changelog for a better overview of the project
  • Contribution guidelines