2.2.0 • Published 6 months ago

node-logger-simple v2.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Logger Module

A simple Node.Js module with configurable options.

Installation

npm install node-logger-simple

Usage

const { FileLogger } = require('node-logger-simple');

// personalised file is required
const logger = new FileLogger({
  logFilePath: "my-log-file"
});

logger.logError('An error has occurred.');
logger.logInfo('Important information.');
logger.logSucces('Succes message.')

Options

Initialize the Logger with the following options:

  • logFilePath (optional): The path to the log file. Default is 'default-log-file.log'.

Methods

  • logError('An error has occurred.') - Logs an error message to the configured log file.
  • logSucces('Succes message.') - Logs an succes message to the configured log file.
  • logInfo('Important information.') - Logs an info message to the configured log file.
2.2.0

6 months ago

2.1.0

6 months ago

2.0.3

6 months ago

2.0.2

6 months ago

2.0.1

6 months ago

2.0.0

6 months ago

1.1.0

6 months ago

1.0.0

6 months ago