0.2.1 • Published 8 years ago

nebulog v0.2.1

Weekly downloads
10
License
-
Repository
github
Last release
8 years ago

nebulog

A enhancement/wrapper around the wonderful Winston logger.

Installation

Installing npm (node package manager)

Installing nebulog

Motivation

Winston is a great logger, but there were a few minor issues about it that I didn't like, or features I wish it had. The enhancements over a vanilla implementation of Winston are:

  • Outputting the filename of the file from which the logging message came from.
  • Aligning the logging message by adding padding after the severity level.
  • Use a more JSON-like syntax when printing the metadata object.
  • Allow arbitrarily many metadata objects to be logged, rather than just one.

Example usage:

Basic Usage

Setting minimum log level

The log available log levels, from least serious to most serious, are:

'silly', 'verbose', 'info', 'warn', 'debug', 'error';

Logger per function