How to use node-loggly-bulk - 2 common examples

To help you get started, we’ve selected a few node-loggly-bulk 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 reactioncommerce / reaction / server / api / logger / loggly.js View on Github external
constructor(logglyConfig, bufferLength = 1, bufferTimeout, callback) {
    if (!logglyConfig || !logglyConfig.token || !logglyConfig.subdomain) {
      throw new Error("bunyan-loggly requires a config object with token and subdomain");
    }

    logglyConfig.json = true;

    this.logglyClient = loggly.createClient(logglyConfig);

    this._buffer = [];
    this.bufferLength = bufferLength;
    this.bufferTimeout = bufferTimeout;
    this.callback = callback || function () {};
  }
github MauriceButler / bunyan-loggly / index.js View on Github external
this.callback = callback || noop;
    this.bufferLength = bufferLength || 1;
    this.bufferTimeout = bufferTimeout || 30 * 1000;

    logglyConfig.json = logglyConfig.json !== false;
    logglyConfig.isBulk = logglyConfig.isBulk !== false;

    if (logglyConfig.isBulk) {
        logglyConfig.bufferOptions = {
            size: this.bufferLength,
            retriesInMilliSeconds: this.bufferTimeout,
        };
    }

    this.logglyClient = loggly.createClient(logglyConfig);
}

node-loggly-bulk

A client implementation for Loggly cloud Logging-as-a-Service API

MIT
Latest version published 3 months ago

Package Health Score

78 / 100
Full package analysis

Popular node-loggly-bulk functions