Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cdimascio/bunyan-cloudant
Bunyan plugin for Cloudant. 'Stream' logs to Cloudant.
https://github.com/cdimascio/bunyan-cloudant
bunyan cloudant logger logging
Last synced: about 1 month ago
JSON representation
Bunyan plugin for Cloudant. 'Stream' logs to Cloudant.
- Host: GitHub
- URL: https://github.com/cdimascio/bunyan-cloudant
- Owner: cdimascio
- License: other
- Created: 2017-02-22T18:04:03.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-22T18:57:14.000Z (almost 8 years ago)
- Last Synced: 2024-12-03T15:44:32.764Z (about 2 months ago)
- Topics: bunyan, cloudant, logger, logging
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# bunyan-cloudant
This is a [bunyan](https://github.com/trentm/node-bunyan) plugin for [Cloudant](https://cloudant.com/). It allows you to 'stream' your bunyan logs to Cloudant.A "stream" is Bunyan's name for where it outputs log messages
## Install
`npm install bunyan-cloudant`
## Usage
```javascript
const bunyan = require('bunyan');
const CloudantStream = require('bunyan-cloudant');const cloudantStream = new CloudantStream({
cloudant: {
url: process.env.COUCHDB_URL
},
dbName: 'server-logs'
});export const L = bunyan.createLogger({
name: 'my-app',
streams: [{
stream: process.stdout // stream to stdout
}, {
stream: cloudantStream // and stream to cloudant
}]
});```
## Options
`CloudantStream` takes the following options```
{
cloudant: { // required
uri: 'http://user:[email protected]'
},
dbName: 'logs', // required
log: myParentBunyanLogger // optional
}
```#### Required Props
The `cloudant` property (*required*) must conform to `cloudant`'s Initialization object. See the
[Initialize](https://github.com/cloudant/nodejs-cloudant) section.The `dbName` property (*required*) is the name Cloudant datbase that to 'stream' logs
The `log` property (*optional*) specifies a parent Bunyan logger
# LICENSE
[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0)