I tried it in another runtime (Python) and using the basic print command provided by Python logs to CloudWatch just fine. The problem is context.logger.log(level:_:) includes more info then I want so I have to filter it when processing the console output. I would prefer to just be able to use print statements like you can in any other runtime. THIS IS DISCRIMINATION!!!
Anyone know why using print() in Swift Lambda's doesn't work? There's no issue with the \(endpoint.rawValue) code.
So you're saying I need to run that statement after each print statement to ensure that all print statements and context.logger print statements are printed in order?
Any logger should do the flushing for you, it's only if you use print you'll need it (and if you don't they'll get logged eventually, on Lambda that's likely at the end of the invocation)
Why it's not appearing you probably need to look at the configuration of the lambda and the logger, it might be piping stdout somewhere else etc.
As an aside, if you combine the logger with the metadata it makes it very easy to filter and find everything, e.g.