Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.logger.info('KafkaRestClient connected to kafka');
}
self.kafkaRestClientConnected = true;
if (!this.kafkaClient || (this.kafkaClient && this.connected)) {
self._flush();
}
} else {
if (self.logger) {
self.logger.warn('KafkaRestClient could not connect to kafka');
}
}
}
options = options || {};
Transport.call(this, options);
this.topic = options.topic || 'unknown';
this.leafHost = options.leafHost;
this.leafPort = options.leafPort;
this.proxyHost = options.proxyHost || 'localhost';
if ('proxyPort' in options && options.proxyPort) {
this.proxyPort = options.proxyPort;
}
this.logger = options.logger;
this.properties = options.properties || {};
this.dateFormats = options.dateFormats || { isodate: 'iso' };
this.peerId = options.hasOwnProperty('peerId') ? options.peerId : -1;
this.workerId = options.hasOwnProperty('workerId') ? options.workerId : -1;
this.logTemplate = {
host: hostName,
level: "LOGLEVELHERE",
msg: "MESSAGEHERE"