LambdaLog is a Node.js package facilitates and enforces logging standards in Node.js processes or applications anywhere by formatting your log messages as JSON for simple parsing and filtering within log management tools, such as CloudWatch Logs. Works with all of the supported versions of Node.js on Lambda.
Originally created for AWS Lambda Functions, LambdaLog is a lightweight and feature-rich library that has no dependency on AWS or Lambda, meaning you can use it in any type of Node.js project you wish. It's really a universal JSON logger.
Why another lambda logger? There are plenty of other logging libraries in the NPM ecosystem but most are convoluted, included more functionality than needed, not maintained, or are not configurable enough. I created LambdaLog to include the important functionality from other loggers, but still maintaining simplicity with minimal dependencies.
Anyone can log JSON to the console
, but with Lambda Log you also get:
Version 3.0.0 of Lambda Log brings a bunch of changes, new features, and a new website.
Broad Changes:
New Features:
levelKey
configuration option to be able to change the key name for log levels.messageKey
configuration option to be able to change the key name for log messages.tagsKey
configuration option to be able to change the key name for tags.addLevel()
method to quickly add a custom log level to an instance of LambdaLog.null
, undefined
or ""
are now removed from the tags array.Error
objects are now automatically converted to a plain object.Breaking Changes:
Documentation for Lambda Log has moved to our new website.
See Development Documentation.
See Contributing Documentation.
MIT License. See License in the repository.
Thanks goes to these wonderful people (emoji key):
Kyle Ross π» π π§ |
Jonathan Goldwasser π» π |
Gabriel π€ |
sh1n1chi8acker π |
Matt Nagi π |
nickcox π |
Tim Schmidt π» |
Marius Tolzmann π |
AndresQ π€ |
Mike Fogel π€ |
This project follows the all-contributors specification. Contributions of any kind welcome!