in backends/kafka.js [28:64]
function KafkaBackend(opts) {
if (!(this instanceof KafkaBackend)) {
return new KafkaBackend(opts);
}
EventEmitter.call(this);
if (!opts) opts = {};
if (opts.port || opts.host) {
throw new Error('logtron.KafkaBackend: ' +
'opts.host and opts.port are deprecated.\n' +
'Please use opts.leafHost and opts.leafPort instead.');
}
this.properties = opts.properties || {};
this.leafHost = opts.leafHost;
this.leafPort = opts.leafPort;
this.proxyHost = opts.proxyHost || 'localhost';
this.proxyPort = opts.proxyPort;
this.maxRetries = opts.maxRetries || 3;
this.statsd = opts.statsd || null;
this.kafkaClient = opts.kafkaClient || null;
this.isDisabled = opts.isDisabled || null;
if ('batching' in opts) {
this.batching = opts.batching;
} else {
this.batching = true;
}
if ('batchingWhitelist' in opts) {
this.batchingWhitelist = opts.batchingWhitelist;
}
if (this.leafHost || this.leafPort) {
throw new Error('[logtron] kafka7 is deprecated');
}
}