How to use the bunyan.default.createLogger function in bunyan

To help you get started, we’ve selected a few bunyan 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 zotoio / github-task-manager / src / agent / AgentLogger.js View on Github external
if (process.env.GTM_LOGSTASH_HOST) {
        let logstashPort = process.env.GTM_LOGSTASH_PORT || 5000;

        bunyanConf.streams.push({
            type: 'raw',
            stream: bunyanTcp
                .createStream({
                    host: process.env.GTM_LOGSTASH_HOST,
                    port: logstashPort
                })
                .on('error', console.error)
        });
    }

    return bunyan.createLogger(bunyanConf);
}