winston-amqp
v0.0.3
Published
An AMQP transport for winston
Downloads
14
Readme
winston-amqp
An AMQP transport for winston. Use winston logging with RabbitMQ to react on log messages. Inspired by winston-mongodb.
Installation
Installing npm (node package manager)
curl http://npmjs.org/install.sh | sh
Installing winston-amqp
[sudo] npm install winston-amqp
Usage
var AMQP = require('winston-amqp').AMQP;
winston.add(AMQP, options);
The AMQP transport takes the following options:
- level: Level of messages that this transport should log.
- silent: Boolean flag indicating whether to suppress output.
- exchange: The name of the exchange you want to push log messages in, defaults to 'winston.log'.
- host: The host running RabbitMQ, defaults to localhost.
- port: The port on the host that RabbitMQ is running on, defaults to 5672.
- vhost: virtual host entry for the RabbitMQ server, defaults to '/'
- login: login for the RabbitMQ server, defaults to 'guest'
- password: password for the RabbitMQ server, defaults to 'guest'
Metadata: Logged as part of the message body with key 'meta' (see examples/subscribe.js).