log4js-node-xmpp

0.0.3 • Public • Published

log4js-node-xmpp Build Status

A log4js-node log appender to send logging events using XMPP protocol.

Installation

npm install log4js-node-xmpp

Usage

Please use it as other log4js-node appenders. It needs host, jid and password at least.

var log4js = require('log4js'),
    xmpp = require('log4js-node-xmpp'),
    logger = log4js.getLogger('hello');

log4js.addAppender(xmpp.configure({
    client: {
        host: 'talk.google.com',
        jid: '<username>',
        password: '<password>'
    },

    to: '<to address>'
}), 'hello');

logger.info('Hello World');

Or you can use the configure method.

var log4js = require('log4js'),
    logger = log4js.getLogger('hello');

log4js.configure({
    appenders: [
        {
            type: 'console'
        },

        {
            "type": "xmpp",
			"category": "hello",

			"client": {
				"host": "talk.google.com",
				"jid": "<username>",
				"password": "<password>"
			},

			"to": "<to address>"
        }
    ]
});
logger.info('Hello World');

Package Sidebar

Install

npm i log4js-node-xmpp

Weekly Downloads

1

Version

0.0.3

License

Apache License 2.0

Last publish

Collaborators

  • likema