Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: re-build winston-couchdb transport adapter #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 20 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
winston-couchdb
===============
# winston-couchdb

A full featured CouchDB transport for winston

[![Build Status](https://travis-ci.org/indexzero/winston-couchdb.png)](https://travis-ci.org/indexzero/winston-couchdb)
[![Version npm](https://img.shields.io/npm/v/winston-couchdb.svg?style=flat-square)](https://www.npmjs.com/package/winston-couchdb)
[![npm Downloads](https://img.shields.io/npm/dm/winston-couchdb.svg?style=flat-square)](https://npmcharts.com/compare/winston-couchdb?minimal=true)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)


[![NPM](https://nodei.co/npm/winston-couchdb.png?downloads=true&downloadRank=true)](https://nodei.co/npm/winston-couchdb/)


## Install

```bash
npm i --save winston winston-couchdb
npm i winston winston-couchdb
```

## Setup

```js
var winston = require('winston')
, winstonCouch = require('winston-couchdb').Couchdb

winston.add(winstonCouch, {
host: 'localhost'
, port: 5984
// optional
, auth: {username: 'user', password: 'pass'}
, secure: false
, level: 'info'
const winston = require('winston')
const CouchLogger = require('winston-couchdb')

const logger = winston.createLogger({
format: winston.format.combine(
winston.format.json(),
winston.format.timestamp()
),
transports: [
new CouchLogger({ url: 'http://username:password@127.0.0.1:5984', db: 'winston-logs' })
]
})

```
Loading