Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A enhancement/wrapper around the wonderful Winston logger
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


A enhancement/wrapper around the wonderful Winston logger.


Installing npm (node package manager)

  curl | sh

Installing nebulog

  [sudo] npm install nebulog


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

  var logger = require('nebulog').make({filename: __filename});

  logger.log('info', 'Logger is working');'This also works');

Setting minimum log level

  var logger = require('nebulog').make({filename: __filename, level: 'warn'});

  logger.warn('This will be visible.');"But this won't");

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

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

Logger per function

  var loggerA = require('nebulog').make({filename: __filename + ':A'});
  var loggerB = require('nebulog').make({filename: __filename + ':B'});

  function A() {'This log message will be marked as coming from A');

  function B() {'But this log message will be marked as coming from B');
Something went wrong with that request. Please try again.