mdneuzerling / lambdr

Run R containers on AWS Lambda
https://lambdr.mdneuzerling.com
Other
131 stars 12 forks source link

Add documentation for debugging #29

Open mdneuzerling opened 11 months ago

mdneuzerling commented 11 months ago

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:

jimgar commented 6 months ago

This would be a very welcome piece of documentation 🙌🏻

mdneuzerling commented 6 months ago

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.