1.0.9 • Published 5 years ago

elogger v1.0.9

Weekly downloads
414
License
MIT
Repository
github
Last release
5 years ago

elogger

MIT licensed

Exclusive logging for nodejs, expressjs, sailsjs, restify, meanjs and many other nodejs based applications.

Installation:

Installing elogger is very simple and one step process. You just need to go inside you nodejs application and run following command.

$ npm install elogger

Usage 01: As Middleware with ExpressJS

const loggingtype = 'combined';
const express = require('express'),
      elogger = require('elogger');

app.use(elogger(loggingtype));

Supported logging types: As elogger uses morgan as it's backbone so all logging type supported by "morgan" is supported here as well by default.

  • null
  • combined
  • common
  • tiny

Besides those it supports custom formatted string of pre-defined tokens. e.g.

Usage 02: For NodeJS command-line applications:

elogger provides few abstract methods for different logging levels to make logging easier and color coded in the terminal as mentioned below:

const logger = require('elogger');

logger.debug('My First Debug Test');
logger.info('My Second Info Test');
logger.warn('My Third Warn Test');
logger.error('My Fourth Error Test');
logger.trace('My Fifth Trace Test');

For more detailed documentation you may refer to official documentation of morgan.

1.0.9

5 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago