Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jorgebay/winston-cassandra
A Cassandra transport for winston
https://github.com/jorgebay/winston-cassandra
Last synced: 2 months ago
JSON representation
A Cassandra transport for winston
- Host: GitHub
- URL: https://github.com/jorgebay/winston-cassandra
- Owner: jorgebay
- License: mit
- Created: 2014-01-16T11:49:12.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-08-08T09:19:50.000Z (over 8 years ago)
- Last Synced: 2024-10-18T06:30:55.663Z (3 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 8
- Watchers: 5
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# 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`).
* __name:__ Name of the transport.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).