How to use the lambda-log.config function in lambda-log

To help you get started, we’ve selected a few lambda-log 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 smithclay / lambdium / src / index.js View on Github external
const chromium = require('./lib/chromium');
const sandbox = require('./lib/sandbox');
const log = require('lambda-log');
const apiHandler = require('./lib/api-handler');

if (process.env.DEBUG_ENV || process.env.SAM_LOCAL) {
  log.config.debug = true;
  log.config.dev = true;
}

log.info('Loading function');

// Create new reusable session (spawns chromium and webdriver)
if (!process.env.CLEAN_SESSIONS) {
  $browser = chromium.createSession();
}

// Handler for POST events from API gateway
// curl -v -F "script=@examples/visitgoogle.js" <>
exports.postApiGatewayHandler = apiHandler;

// Default function event handler
// Accepts events:
// * {"Base64Script": "<>"}
github smithclay / lambdium / src / index.js View on Github external
const chromium = require('./lib/chromium');
const sandbox = require('./lib/sandbox');
const log = require('lambda-log');
const apiHandler = require('./lib/api-handler');

if (process.env.DEBUG_ENV || process.env.SAM_LOCAL) {
  log.config.debug = true;
  log.config.dev = true;
}

log.info('Loading function');

// Create new reusable session (spawns chromium and webdriver)
if (!process.env.CLEAN_SESSIONS) {
  $browser = chromium.createSession();
}

// Handler for POST events from API gateway
// curl -v -F "script=@examples/visitgoogle.js" <>
exports.postApiGatewayHandler = apiHandler;

// Default function event handler
// Accepts events:

lambda-log

Lightweight logging library for any Node 10+ applications

MIT
Latest version published 3 years ago

Package Health Score

50 / 100
Full package analysis