-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jorge Bay Gondra
committed
Feb 3, 2015
1 parent
fb877f0
commit 063e745
Showing
1 changed file
with
34 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,34 @@ | ||
# winston-cassandra | ||
|
||
A Cassandra transport for [winston](https://github.com/flatiron/winston) logging library. | ||
|
||
## Installation | ||
``` bash | ||
$ npm install winston | ||
$ npm install winston-cassandra | ||
``` | ||
[![Build Status](https://secure.travis-ci.org/jorgebay/winston-cassandra.png)](http://travis-ci.org/jorgebay/winston-cassandra) | ||
|
||
## Usage | ||
``` js | ||
var winston = require('winston'); | ||
|
||
// Adds a Cassandra transport (it also adds the field `winston.transports.Cassandra`) | ||
winston.add(require('winston-cassandra'), options); | ||
``` | ||
|
||
The Cassandra transport accepts the following options: | ||
|
||
* __level:__ Level of messages that this transport should log (default: `'info'`). | ||
* __table:__ The name of the Cassandra column family you want to store log messages in (default: `'logs'`). | ||
* __partitionBy:__ How you want the logs to be partitioned. Possible values `'hour'` and `'day'`(Default). | ||
* __consistency:__ The consistency of the insert query (default: `quorum`). | ||
|
||
In addition to the options accepted by the [Node.js Cassandra driver](https://github.com/jorgebay/node-cassandra-cql) | ||
[Client][0]. | ||
|
||
* __hosts:__ Cluster nodes that will handle the write requests: | ||
Array of strings containing the hosts, for example `['host1', 'host2']` (required). | ||
* __keyspace:__ The name of the keyspace that will contain the logs table (required). The keyspace should be already created in the cluster. | ||
* __[...][0]__ | ||
|
||
## License | ||
Distributed under the [MIT license](https://github.com/jorgebay/winston-cassandra/blob/master/LICENSE.txt). | ||
|
||
|
||
[0]: https://github.com/jorgebay/node-cassandra-cql#client | ||
# winston-cassandra | ||
|
||
A Cassandra transport for [winston](https://github.com/flatiron/winston) logging library. | ||
|
||
## Installation | ||
``` bash | ||
$ npm install winston | ||
$ npm install winston-cassandra | ||
``` | ||
[![Build Status](https://secure.travis-ci.org/jorgebay/winston-cassandra.png)](http://travis-ci.org/jorgebay/winston-cassandra) | ||
|
||
## Usage | ||
``` js | ||
var winston = require('winston'); | ||
|
||
// Adds a Cassandra transport (it also adds the field `winston.transports.Cassandra`) | ||
winston.add(require('winston-cassandra'), options); | ||
``` | ||
|
||
The Cassandra transport accepts the following options: | ||
|
||
* __level:__ Level of messages that this transport should log (default: `'info'`). | ||
* __table:__ The name of the Cassandra column family you want to store log messages in (default: `'logs'`). | ||
* __partitionBy:__ How you want the logs to be partitioned. Possible values `'hour'` and `'day'`(Default). | ||
* __consistency:__ The consistency of the insert query (default: `quorum`). | ||
|
||
In addition to the options accepted by the [Node.js Cassandra driver](https://github.com/datastax/nodejs-driver). | ||
|
||
* __contactPoints:__ Cluster nodes that will handle the write requests: | ||
Array of strings containing the hosts, for example `['host1', 'host2']` (required). | ||
* __keyspace:__ The name of the keyspace that will contain the logs table (required). The keyspace should be already created in the cluster. | ||
|
||
## License | ||
Distributed under the [MIT license](https://github.com/jorgebay/winston-cassandra/blob/master/LICENSE.txt). |