Stream log from bunyan to MongoDB capped collection. A stream transport for bunyan that writes logs to a MongoDB capped collection. Version 0.1.0, released to npm. This package allows easy integration of bunyan logging with MongoDB for storage and management using capped collections. It is ideal for applications using bunyan for logging that require MongoDB for log storage. Differentiators include simplicity and direct integration with bunyan streams.
npm install bunyan-mongoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a bunyan logger writing to a MongoDB capped collection using bunyan-mongo stream.
Ensure you have a MongoDB connection and call setDB(db) before logging the first interesting message.
Create a capped collection or use options to specify collection name; otherwise the default collection must be capped.
Set stream type to 'raw' in bunyan configuration.
Run 'npm install bunyan-mongo' and ensure the require is correct.
Use 'const BunyanMongo = require("bunyan-mongo")' correctly.