winston-amqp

An AMQP transport for winston

npm install winston-amqp
9 downloads in the last week
32 downloads in the last month

winston-amqp

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

Build Status

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).

Author: Krispin Schulz

npm loves you