Socket
Socket
Sign inDemoInstall

bunyan-amqp

Package Overview
Dependencies
10
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    bunyan-amqp

ES6 AMQP transport stream for Bunyan logging library.


Version published
Weekly downloads
5
increased by400%
Maintainers
1
Install size
725 kB
Created
Weekly downloads
 

Readme

Source

bunyan-amqp

AMQP 0.9.1 compatible transport stream for use with the Bunyan logging library. Intended to be used with a RabbitMQ "topic" type exchange. Where the hostname becomes the first topic, the name of the Bunyan logger application is used as the secondary topic followed by the string log level. Example Topic: "My-MacbookPro.MyAppName.info". Has only been tested with RabbitMQ but it should be AMQP standards compliant.

TODO:

  • Test suite
  • More configuration options

This package was created for use with microservices at my company. I would eventually like to make this more configurable for public consumption.

var Log = require('bunyan').createLogger({
  name: 'MyAppName'
  streams: [
    {
      stream: process.stdout,
      level: 'trace',
    },
    {
      type: 'raw',
      level: 'debug',
      stream: require('bunyan-amqp')({
        host: '127.0.0.1',
        port: 5672,
        vhost: 'logger',
        exchange: 'exchangeName',
        queue: 'queueName',
        username: 'username',
        password: 'password',
      }),
    },
  ],
});

var ChildLog = Log.child({ module: 'MyAppNameChildModule' });

Log.info('Testing info level...');
Log.debug('Testing debug level...');
Log.fatal('Testing fatal level...');

ChildLog.info('Testing child info level...');
ChildLog.debug('Testing child debug level...');
ChildLog.fatal('Testing child fatal level...');

Keywords

FAQs

Last updated on 28 Sep 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc