Skip to content

A writable stream that writes log JSON objects (as generated by bunyan) to CouchDB / PouchDB

License

Notifications You must be signed in to change notification settings

science-periodicals/bunyan-couchdb-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bunyan-couchdb-stream

CircleCI

styled with prettier

Note: this module is auto published to npm on CircleCI. Only run npm version patch|minor|major and let CI do the rest.

A writable stream that writes log JSON objects (as generated by bunyan) to CouchDB / PouchDB

var bunyan = require('bunyan');
var LogStream = require('bunyan-couchdb-stream');

var log = bunyan.createLogger({
  name: 'test',
  streams: [{
    stream: new LogStream('http://127.0.0.1:5895/mydb'),
    type: 'raw' // this is required
  }],
});

log.info({foo: 'bar'}, 'hello world');

If the database does not exists, bunyan-couchdb-stream will try to create it.

About

A writable stream that writes log JSON objects (as generated by bunyan) to CouchDB / PouchDB

Resources

License

Stars

Watchers

Forks

Packages

No packages published