1.1.1 • Published 2 years ago

bunyan-logstash-amqp v1.1.1

Weekly downloads
675
License
MIT
Repository
github
Last release
2 years ago

Logstash AMQP stream for Bunyan

Build Status

Logstash stream via AMQP for the Bunyan logger

An AMQP logger for Logstash

Installation

$ npm install bunyan-logstash-amqp

Usage

"use strict";

var bunyan = require('bunyan');

var amqp_stream = require('bunyan-logstash-amqp').createStream({
    vhost: "logging",
    exchange: {
        routingKey: 'logs'
    }})
.on('connect', function() { console.log("Connected to amqp"); })
.on('close', function() { console.log("Closed connection to amqp"); })
.on('error', console.log );

var log = bunyan.createLogger({
    name: 'example',
    streams: [{
        level: 'debug',
        stream: process.stdout
    },{
        level: 'debug',
        type: "raw",
        stream: amqp_stream
    }],
    level: 'debug'
});

Configuration

A raw bunyan stream can be created using the module createStream(options)method.

The options object accepts the following fields:

The exchange object accepts the following fields:

Events

The stream will emit open, close and error events from the underlying AMQP connection.

Credits

This module is heavily based on bunyan-logstash-tcp.

License

The MIT License (MIT)

Copyright (c) 2015 Brandon Hamilton

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1.1.1

2 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.7

7 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago