Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JavaScript
branch: master
Failed to load latest commit information.
.gitignore Initial commit.
LICENSE.txt Add license
README.md README: Remove hard line breaks
logger.js Support the console.log() API when using syslog.
package.json 1.2.0

README.md

simple-log

A simple logger for node.js, which logs to syslog using the popular console API.

Support this project by donating on Gratipay.

Installation

npm install simple-log

Usage

var logger = require( "simple-log" ).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 )

Each method supports the full console.log()/util.format() API.

License

Copyright Scott González. Released under the terms of the MIT license.


Support this project by donating on Gratipay.

Something went wrong with that request. Please try again.