How to use the winston-uber.Logger 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 / sentry-logger / test / works-with-winston.js View on Github external
test('SentryLogger error msg formatting', function (assert) {
    var messages = [];
    var sLogger = new SentryLogger({
        ravenClient: fakeRavenClient(function () {
            messages.push([].slice.call(arguments));
        })
    });

    var logger = new Logger({
        transports: [ sLogger ]
    });

    logger.error('oops');

    assert.equal(messages[0][1], 'works-with-winston.js: oops');

    assert.end();
});
github uber / sentry-logger / test / lib / create-logger.js View on Github external
if (typeof opts === 'function') {
        listener = opts;
        opts = {};
    }

    var server;

    opts = opts || {};

    if (!opts.dsn) {
        server = SentryServer(listener);
        opts.dsn = server.dsn;
    }

    var sLogger = new SentryLogger(opts);
    var logger = new Logger({
        transports: [ sLogger ]
    });

    logger.destroy = function () {
        if (server) {
            server.close();
        }
    };

    return logger;
}

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