bunyan-mongo
Stream log from bunyan to MongoDB capped collection.
Last updated 5 years ago by jysperm .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bunyan-mongo 
SYNC missed versions from official npm registry.

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'

Current Tags

  • 0.1.0                                ...           latest (5 years ago)

1 Versions

  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (2)
Dev Dependencies (2)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |