1.0.7 • Published 6 years ago

node-ez-logger v1.0.7

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

Node EZ Logger

Simple logging module for node.js

Introduction

This module is writing log messages to the console and to files in the log folder.

Usage

Install

Install the package with NPM

npm install node-ez-logger

Require

In your script file include the module

const logger = require('node-ez-logger');

Use

In your code you can log with info(), warning(), error() or debug() methods

logger.info('info message in the log');
logger.warning('warning message in the log');
logger.error('error message in the log');
logger.debug('debug message in the log');

Configuration

You have the possibility to change the path, where the file will be placed, and the format of the date in the logfiles and in the console.

Date Format

logger.config.dateFormat(format: string): void

logger.config.dateFormat('Y-m-d H:i:s,V');

Log Path

logger.config.logPath(path: string): void

logger.config.logPath('custompath/logs');
1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago