af-log
v1.0.2
Published
colored log with log levels
Downloads
3
Readme
af-log
Installation
$ npm install af-log
Usage
const logger = require('af_log')('ClassName');
logger.debug('this will be a debug log entry');
logger.info('this will be a info log entry');
logger.warning('this will be a warning log entry');
logger.error('this will be a error log entry');
node ENV
LOG_PREFIX
Define a string to be used as prefix. Default:
af-log
LOG_LEVEL
Sets the log level for node process. Valid options:
- error: 3 - warning: 2 - info: 1 - debug: 0
Default:
2
(warning)LOG_TIME
Show timestamp in log. Default:
true