README
LOGGER
Install
npm i logger-pkg
Usage
const Logger = require('logger-pkg');
let logger = new Logger();
let logger = new Logger({
options
});
Options
Include date time each time information is recorded.
logTime: false
- default: true
Name of the folder where the records will be hosted.
folderName: 'custom'
- default: 'logs'
Maximum allowed size of a file.
fileMaxSize: 2000000
- min: 1000000
- default: 5000000
- 1000000 ~ 1Mb
Maximum allowed quantity of files. Once quantity is reached the oldest one is eliminated.
fileMaxQuantity: 5
- min: 1
- default: 3
Examples
logger.debug(data);
logger.debug(data1, data2, ...);
logger.error(data);
logger.error(data1, data2, ...);
logger.info(data);
logger.info(data1, data2, ...);