
Security News
Node.js TSC Declines to Endorse Feature Bounty Program
The Node.js TSC opted not to endorse a feature bounty program, citing concerns about incentives, governance, and project neutrality.
bole-mongodb
Advanced tools
Plugin for the bole logger. Saves the logs to a MongoDB collection, log
by default.
var bole = require('bole');
var boleMongo = require('bole-mongodb');
MongoClient.connect(url, function (err, db) {
if (err) return console.error(err);
var boleMongoStream = boleMongo({ db: db, capped: true })
.on('error', console.error);
bole.output([
{ level: 'error', stream: boleMongoStream }
]);
var log = bole('my-module');
});
The Db
object is required. Instead of opening a new connection from inside the plugin, the user is responsible for the connection's lifecycle. Therefore, this plugin assumes that the connection is already open. However, it won't fail if it's not.
MongoDB has the concept of a Capped collection and it can be used for logging purposes. This plugin tries to create a capped collection each time a message is logged. Therefore, it's not required to have the connection open at the time of registering the plugin.
module(options) : Writable
Returns a new Writable stream instance.
Options:
Db
instance. This option is mandatory.logs
.false
.10000000
(10MB rounded up to the nearest multiple of 256).undefined
.false
.FAQs
MongoDB stream for the bole logger
The npm package bole-mongodb receives a total of 1 weekly downloads. As such, bole-mongodb popularity was classified as not popular.
We found that bole-mongodb 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
The Node.js TSC opted not to endorse a feature bounty program, citing concerns about incentives, governance, and project neutrality.
Research
Security News
A look at the top trends in how threat actors are weaponizing open source packages to deliver malware and persist across the software supply chain.
Security News
ESLint now supports HTML linting with 48 new rules, expanding its language plugin system to cover more of the modern web development stack.