Skip to content
An Ain2 based Syslog transport for log4js-node
Latest commit 0af2016 Mar 2, 2014 @itamar-k itamar-k Merge pull request #1 from insidewarehouse/master
Bumping versions
Failed to load latest commit information.
.gitignore Update Feb 12, 2013
package.json Bumping versions Jan 28, 2014


An Ain2 based Syslog transport for log4js-node.


  $ npm install log4js-ain2


To use this Syslog transport in log4js-node, you simply need to 'npm install' it and add it as an appender

Configuration file example:

    "appenders": [
            "type": "log4js-ain2", 
            "tag": "SYSLOG_TAG", 
            "facility": "daemon", 
            "hostname": "SYSLOG_SERVER", 
            "port": SYSLOG_PORT

Code example:

var log4js = require('log4js');

    appenders: [ 
            type: 'log4js-ain2', 
            tag: 'SYSLOG_TAG', 
            facility: 'daemon', 
            hostname: 'SYSLOG_SERVER', 
            port: SYSLOG_PORT

var logger = log4js.getLogger('log4js-ain2-tester');

logger.trace('trace -Entering cheese testing');
logger.debug('debug - Got cheese.');'info - Cheese is Gouda.');
logger.warn('warn - Cheese is quite smelly.');
logger.error('error -Cheese is too ripe!');
logger.fatal('fatal - Cheese was breeding ground for listeria.');

NOTE: Options are passed through to Ain2

Log Levels

This is the mapping from log4js-node levels to ain2 levels

ALL -> debug
TRACE -> debug
DEBUG -> debug
INFO -> info
WARN -> warn
ERROR -> err
FATAL -> crit

Syslog (ain2) Configuration

See ain2

Something went wrong with that request. Please try again.