bunyan-nokafka

1.1.0 • Public • Published

Build Code Climate Test Coverage License

Bunyan Kafka Stream Plugin

bunyan-nokafka is bunyan stream for Kafka with no-kafka library.

Usage

const bunyan = require('bunyan');
const KafkaStream = require('bunyan-nokafka');

const logger = bunyan.createLogger({
  name: 'cached-rethinkdb-test',
});

const kafkaStream = new KafkaStream({
  topic: 'log-topic',
  kafkaOpts: {
    connectionString: '127.0.0.1:9092',
    partitioner: KafkaStream.roundRobinPartitioner(),
  },
});

kafkaStream.on('ready', () => {
  logger.addStream({
    level: bunyan.INFO,
    stream: kafkaStream,
  });
});

Kafka Options

Please refer to no-kafka producer options

Author

Ananse Limited opensource@ananse.io

License: Apache 2.0

Readme

Keywords

none

Package Sidebar

Install

npm i bunyan-nokafka

Weekly Downloads

348

Version

1.1.0

License

Apache-2.0

Last publish

Collaborators

  • bedatse