log-uncaught-exceptions

1.0.0 • Public • Published

log-uncaught-exceptions

Logs uncaught process exceptions to the given logger (ideally a Bunyan logger but works with any object with a fatal method).

Installation

npm install log-uncaught-exceptions

Usage

// CommonJS
// const logUncaughtExceptions = require('log-uncaught-exceptions');

// ES6
import logUncaughtExceptions from 'log-uncaught-exceptions/es';

import bunyan from 'bunyan';
const logger = bunyan.createLogger({ name: "myapp" });

logUncaughtExceptions({ logger });

Testing

Clone the repository and execute:

npm test

Contribute

  1. Fork it: git clone https://github.com/softonic/log-uncaught-exceptions.git
  2. Create your feature branch: git checkout -b feature/my-new-feature
  3. Commit your changes: git commit -am 'Added some feature'
  4. Check the build: npm run build
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request :D

Readme

Keywords

none

Package Sidebar

Install

npm i log-uncaught-exceptions

Weekly Downloads

0

Version

1.0.0

License

Apache-2.0

Last publish

Collaborators

  • softonic