1.0.2 • Published 5 years ago

logger-pkg v1.0.2

Weekly downloads
2
License
ISC
Repository
-
Last release
5 years ago

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, ...);
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago