Skip to content

medikoo/log-aws-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

log-aws-lambda

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("log-aws-lambda")();

Note: Value of LOG_TIME env var is ignored, as AWS logs by default are accompanied with absolute timestamps

Tests

$ npm test

About

log4 log writer for AWS Lambda environment

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published