@zeytech/error-reporting-file-driver
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

error-reporting-file-driver

Provides a file-based driver for Zeytech's error reporting AdonisJS module.

npm-image license-image typescript-image

This plugin provides a simple file-based driver for Zeytech's error reporting module for AdonisJS. It does not keep an open stream to the log file, but instead calls fs.appendFile each time. While this can be an "expensive" operation, it was decided that this was more desirable than keeping a file handle open all the time. If you need to report errors so often that this becomes an issue, fix your errors instead. 😉 In addition, this choice will allow sys admins to utilize log rotation with any emitted files.

Installation

npm install @zeytech/error-reporting-file-driver

node ace configure @zeytech/error-reporting-file-driver

Usage

See the parent project's README for full usage. This usage will focus on configuration options available for this driver.

Config options

  • path - string; relative or absolute path to the file to log to. Make sure you have proper permissions to write to this location.
  • includeTimestamp - boolean; whether or not to prefix each logged error with the UTC timestamp of when it was logged.

Package Sidebar

Install

npm i @zeytech/error-reporting-file-driver

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

10.7 kB

Total Files

9

Last publish

Collaborators

  • zeytech