lambdr
lambdr copied to clipboard
Add documentation for debugging
lambdr
is set up to use the logger
package, and all logs automatically go to Cloudwatch. The package is missing instructions on how to use this functionality, perhaps in the form of a vignette. It would need to cover:
- logging basics, particularly log levels (many log entries automatically made by
lambdr
are at the DEBUG level) - how to add your own log entries
- how to view log entries
This would be a very welcome piece of documentation 🙌🏻
So this is absolutely still on the agenda, and does deserve its own vignette.
The lambdr
package is integrated with the logger
package for generating logs. The internals of the package even generate debug-level log entries, eg. https://github.com/mdneuzerling/lambdr/blob/a3cece5b23f9f1b89e95972506f79f9a6eb2ee22/R/start-listening.R#L86
Log entries are automatically captured by AWS CloudWatch. Normally the debug-level entries don't show because the log level isn't high enough but this can be changed by running logger::log_threshold(logger::DEBUG)
before running start_lambda
. And, of course, the user can log whatever they would like as well.