1.0.2 • Published 6 years ago

@downstacks/downlogger v1.0.2

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

Downlogger

Description

Downlogger is a NodeJS logger.

Installation

$ npm install @downstacks/downlogger

Usage

Basic usage

const Logger = require('@downstacks/downlogger');

var logger = new Logger();
logger.log('This is a log message');

Store logs in a file

For logging in console and in the log file :

var logger = new Logger('path/to/file.log');
logger.log('This is a log message and it is written in a file');

For logging only in the log file :

var logger = new Logger('path/to/file.log', false);
logger.log('This is a log message only written in a file');

Log functions

Logging information message :

logger.info('Log message');

Logging debug message (with traces enabled by default) :

logger.debug('Log message');

Logging warn message :

logger.warn('Log message');

Logging error message :

logger.error('Log message');
1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago