Logger
Usage:
const Logger = require('@thisisAbdus/logger');
const logger = new Logger(options);
logger.log('message', __filename);
Tips:
-
If you're logging an error, just pass the error instance. Logger will extract the error message from error stackTrace or
Error.message
-
You can pass objects and arrays but no functions (as it just shows
[Function: nameOfFunction]
) and it's kinda irrelevent to log that.