@roarr/middleware-serialize-error

1.0.0 • Public • Published

@roarr/middleware-serialize-error

Travis build status Coveralls NPM version Canonical Code Style Twitter Follow

Serializes error objects in the Roarr message context.

Behaviour

The current implementation maps only the direct context properties.

Raise an issue if you have a use case that requires deep property mapping.

Usage

import log from 'roarr';
import createSerializeErrorMiddleware from '@roarr/middleware-serialize-error';

const childLog = log.child(createSerializeErrorMiddleware());

const error = new Error('foo');

log.debug({error}, 'bar');
childLog.debug({error}, 'bar');

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    691
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    691

Package Sidebar

Install

npm i @roarr/middleware-serialize-error

Weekly Downloads

691

Version

1.0.0

License

none

Unpacked Size

8.04 kB

Total Files

6

Last publish

Collaborators

  • gajus