loglog-mongodb

1.1.0 • Public • Published

Loglog MongoDB

MongoDB logging transport for Loglog

Install:

npm install -S loglog-mongodb

Usage:

var loglog = require('logllog');
 
// Log to console and mongo
var logger = logger.create( 'App', {
  transports: [
    loglog.transports.console()
  , require('loglog-mongodb')({
      connection: 'mongodb://my_host/my_db'
    , collection: 'logs' // (default)
      // See all options for db.createCollection()
      // http://mongodb.github.io/node-mongodb-native/2.0/api-docs
    , collectionOptions: {
        capped: true // (default)
      , size:   1000 * 1000 * 1000 * 4 // (default) 4gigs
      }
    })
  ]
});

Readme

Keywords

Package Sidebar

Install

npm i loglog-mongodb

Weekly Downloads

3

Version

1.1.0

License

ISC

Last publish

Collaborators

  • johndotawesome