2.0.1 • Published 6 years ago

log4-aws-lambda v2.0.1

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

*nix build status Windows build status Tests coverage Transpilation status npm version

log4-aws-lambda

log4 log writer for AWS Lambda environment

  • Printf-like message formatting
  • Configure log level visbility threshold through LOG_LEVEL env variable (defaults to notice)
  • Extra debug output can be controlled via LOG_DEBUG env variable (fallbacks to DEBUG if provided)
  • Object inspection depth defaults to 4, but can be overriden via LOG_INSPECT_DEPTH (fallbacks to DEBUG_DEPTH if provided)
  • Writes logs via console.error (not process.stderr) to ensure logs are accompanied in CloudWatch by AWS prefixes

Usage

At beginning of main module of your program invoke:

require("log4-aws-lambda")();

Tests

$ npm test