Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
],
});
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;