How to use the winston-uber.Transport.call function in winston-uber

To help you get started, we’ve selected a few winston-uber examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uber / kafka-logger / index.js View on Github external
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"

winston-uber

A multi-transport async logging library for Node.js

MIT
Latest version published 8 years ago

Package Health Score

67 / 100
Full package analysis