wherr

1.1.0 • Public • Published

Wherr

Simple logging helper.

Usage

You could plug it to console.error like:

const wherr = require('wherr');
console.error('Something weird', wherr());

This will output:

Something weird file.js:2:34

Or, create your custom error logger. You'll need to pass abstraction level to wherr this way.

logerr = (...args) => console.error(...args, wherr(1)));

And use it like:

logerr('Something weird');

Will produce:

Something weird file.js:2:1

Combine this with other logging utility like chalk, or pino.

Readme

Keywords

Package Sidebar

Install

npm i wherr

Weekly Downloads

4

Version

1.1.0

License

MIT

Unpacked Size

1.28 kB

Total Files

4

Last publish

Collaborators

  • bentinata