swift-aws-lambda-runtime
swift-aws-lambda-runtime copied to clipboard
print statements do not work despite context.logger.info(stringLiteral:) working
Expected behavior
I expect print statement to print to the cloud watch console logs.
Actual behavior
Printing only works via context.logger (Lambda.Context)
Steps to reproduce
- Execute print statement
- See that print statement isn't in cloud watch logs
If possible, minimal yet complete reproducer code (or URL to code)
No response
What version of this project (swift-aws-lambda-runtime) are you using?
0.5.2
Swift version
5.8 based on the Amazon Linux 2 docker image — I'm assuming that the swift version included there is the version it's built with.
Amazon Linux 2 docker image version
swift:5.8-amazonlinux2
You might be bumping into some buffering problems. Try fflush(stdout) right after your print().