Skip to content

A Winston transport to log messages into an Apache Kafka topic.

License

Notifications You must be signed in to change notification settings

Avocarrot/winston-kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

winston-kafka

A Winston transport to log messages into an Apache Kafka topic.

Dependencies

Installation

npm install winston-transport-kafka

Usage

var winston = require('winston');
winston.transports.KafkaTransport = require('winston-transport-kafka').Kafka;

var options = {
  topic: 'logs'
};

winston.add(winston.transports.KafkaTransport, options);

###Options

  • topic - (required) Kafka topic.
  • clientId - Kafka client ID | Default: winston-kafka-transport
  • connectionString - Zookeeper connection string | Default: localhost:2181
  • compress - Compress messages before sending to Kafka (Gzip)| Default: false
  • producerOptions - Kafka HighLevelProducer options
  • zkOptions - Zookeeper Options

Contributing

This project is work in progress and we'd love more people contributing to it.

  1. Fork the repo
  2. Apply your changes
  3. Write tests
  4. Submit your pull request

For feedback or suggestions you can drop us a line at [email protected]

About

A Winston transport to log messages into an Apache Kafka topic.

Resources

License

Stars

Watchers

Forks

Packages

No packages published