Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
bunyan-amqp-logger
Advanced tools
Readme
AMQP stream for the Bunyan logger
$ npm install bunyan-amqp-logger
"use strict";
var bunyan = require('bunyan');
var bunyanamqp = require('bunyan-amqp-logger');
var amq_stream = bunyanamqp.createStream({
login : 'admin',
password : 'UbpdMksr0ons',
exchange : {
routingKey : 'logs'
}
}).on('connect', function () {
console.log("Connected to amqp");
}).on('close', function (e) {
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 : amq_stream
}]
});
A raw bunyan stream can be created using the module createStream(options)
method.
The options
object accepts the following fields:
Parameter | Type | Default | Description |
---|---|---|---|
host | string | localhost | AMQP host |
port | number | 5672 | AMQP port |
vhost | string | / | AMQP virtual host |
login | string | guest | AMQP username |
password | string | guest | AMQP password |
sslEnable | boolean | false | Enable AMQP SSL |
sslKey | string | '' | AMQP SSL private key file path |
sslCert | string | '' | AMQP SSL certificate file path |
sslCA | string | '' | AMQP SSL CA file path |
sslRejectUnauthorized | boolean | true | Verify AMQP SSL certificate against CA |
exchange | object | undefined | AMQP exchange options |
level | string | info | Message level |
server | string | os.hostname() | Message source server |
application | string | process.title | Message source application |
pid | string | process.pid | Message pid |
tags | string array | ["bunyan"] | Message tags |
type | string | undefined | Message type |
bufferSize | number | 100 | Outstanding message buffer size |
messageFormatter | function | undefined | Optional message formatting function |
The exchange object accepts the following fields:
Parameter | Type | Default | Description |
---|---|---|---|
name | string | undefined | AMQP exchange name |
routingKey | string | message.level | AMQP message routing key |
properties | object | {} | AMQP exchange options |
The stream will emit open
, close
and error
events from the underlying AMQP connection.
This module is heavily based on bunyan-logstash-amqp.
FAQs
AMQP stream for the Bunyan logger
The npm package bunyan-amqp-logger receives a total of 76 weekly downloads. As such, bunyan-amqp-logger popularity was classified as not popular.
We found that bunyan-amqp-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.