How to use the logdna.createLogger function in logdna

To help you get started, we’ve selected a few logdna 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 bluzi / travis-buddy / utils / logger.js View on Github external
},
  ],
});

let logzIoLogger;

if (process.env.logzIoAccessToken) {
  logzIoLogger = logzIo.createLogger({
    token: process.env.logzIoAccessToken,
    type: 'api',
  });
}

let logdnaLogger;
if (process.env.logdnaApiKey) {
  logdnaLogger = logdna.createLogger(process.env.logdnaApiKey, {
    env,
    hostname: os.hostname(),
    ip: ip.address(),
  });
}

function setLevel(level) {
  switch (level) {
    case 'all':
      logLevel = 1;
      break;

    case 'warnings':
      logLevel = 2;
      break;

logdna

LogDNA's Node.js Logging Module.

MIT
Latest version published 3 years ago

Package Health Score

45 / 100
Full package analysis