Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print statements do not work despite context.logger.info(stringLiteral:) working #317

Closed
biajoeknee opened this issue Jan 11, 2024 · 2 comments

Comments

@biajoeknee
Copy link

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

  1. Execute print statement
  2. 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

@MahdiBM
Copy link
Contributor

MahdiBM commented Jan 12, 2024

You might be bumping into some buffering problems. Try fflush(stdout) right after your print().

@sebsto
Copy link
Contributor

sebsto commented Nov 7, 2024

This is expected behaviour. I'm closing this, feel free to re-open if you think you're still affected by this issue (using runtime v2, from the main branch)

@sebsto sebsto closed this as completed Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants