https://github.com/likema/log4js-node-xmpp
A log4js-node log appender to send logging events using XMPP protocol.
https://github.com/likema/log4js-node-xmpp
Last synced: 8 months ago
JSON representation
A log4js-node log appender to send logging events using XMPP protocol.
- Host: GitHub
- URL: https://github.com/likema/log4js-node-xmpp
- Owner: likema
- License: apache-2.0
- Created: 2013-12-28T07:26:47.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-02-07T08:49:07.000Z (over 11 years ago)
- Last Synced: 2025-01-31T17:42:26.328Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 175 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# log4js-node-xmpp [](https://travis-ci.org/likema/log4js-node-xmpp)
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.
```js
var log4js = require('log4js'),
xmpp = require('log4js-node-xmpp'),
logger = log4js.getLogger('hello');
log4js.addAppender(xmpp.configure({
client: {
host: 'talk.google.com',
jid: '',
password: ''
},
to: ''
}), 'hello');
logger.info('Hello World');
```
Or you can use the configure method.
```js
var log4js = require('log4js'),
logger = log4js.getLogger('hello');
log4js.configure({
appenders: [
{
type: 'console'
},
{
"type": "xmpp",
"category": "hello",
"client": {
"host": "talk.google.com",
"jid": "",
"password": ""
},
"to": ""
}
]
});
logger.info('Hello World');
```