@rglux-tech/logger
v1.0.0
Published
Logging utility for the Bitget Helper project.
Downloads
2
Readme
bh-logger
Logging utility for the Bitget Helper project.
This Node.js package is a function builder that generate a method used as shortcut to console.log while hadding a prefix to each log.
The logging method support the standard logging method from the object 'console' such as log, warn and error.
Usage
const log = require('bh-logger')('Prefix | ');
log('Something happened');
log('log', 'Something happened');
//Equivalent to console.log('Prefix | Something happened');
log('warn', 'Something happened');
//Equivalent to console.warn('Prefix | Something happened');
log('error', 'Something happened');
//Equivalent to console.error('Prefix | Something happened');