bunyan-mongo

0.1.0 • Public • Published

bunyan-mongo

Stream log from bunyan to MongoDB capped collection.

Usages:

BunyanMongo = require 'bunyan-mongo'
bunyanMongo = new BunyanMongo()

logger = bunyan.createLogger
  name: 'sample'
  streams: [
    type: 'raw'
    stream: bunyanMongo
  ]

logger.info 'before connecting to MongoDB'

MongoClient.connect 'mongodb://localhost/test', (err, db) ->
  bunyanMongo.setDB db
  logger.info 'after connecting to MongoDB'

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.0145latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.0145

Package Sidebar

Install

npm i bunyan-mongo

Weekly Downloads

145

Version

0.1.0

License

MIT

Last publish

Collaborators

  • jysperm