No description, website, or topics provided.
Switch branches/tags
Nothing to show
Pull request Compare This branch is 13 commits behind scottgonzalez:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
logger.js
package.json

README.md

node-logger

A simple logger for node.js.

Installation

npm install git://github.com/jquery/node-logger.git

Note: This module is very basic and is only intended to standardize logging within jQuery projects, so this is not versioned or published on npm.

Usage

var logger = require( "logger" ).init( "appname" );
logger.log( "hello" );

The logger will log to syslog by default. If the main script is executed with --console then the logger will log to the console, allowing for easier testing during development.

API

The logger supports three methods:

  • logger.log( msg )
  • logger.warn( msg )
  • logger.error( msg )