winston-amqp

An AMQP transport for winston

winston-amqp

An AMQP transport for winston. Use winston logging with RabbitMQ to react on log messages. Inspired by winston-mongodb.

  curl http://npmjs.org/install.sh | sh
  [sudo] npm install winston-amqp
  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).

Author: Krispin Schulz