aws / aws-lambda-java-libs

Official mirror for interface definitions and helper classes for Java code running on the AWS Lambda platform.

Home Page:https://aws.amazon.com/lambda/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AWS documentation says LambdaLogger will default to the INFO log level, but it is actually defaulting to UNDEFINED

stefansundin opened this issue · comments

The documentation on this page: https://docs.aws.amazon.com/lambda/latest/dg/java-logging.html#java-logging-advanced

If you don't assign a level to your log output, Lambda will automatically assign it the level INFO.

But this does not seem to be true. I am getting UNDEFINED in my tests, as this code seems to reinforce:

public enum LogLevel {
// UNDEFINED log level is used when the legacy LambdaLogger::log(String) function is called
// where the loglevel is not defined. In this case we're not filtering the message in the runtime
UNDEFINED,

According to this code it seems like UNDEFINED is intended, so perhaps the docs should be updated.

Thanks.

this is fixed in versions 2.4.2 of RIC, which is already available in maven central. Managed runtime and OCI base images deployments are also scheduled

Closing the issue as the fix has been deployed recently. Feel free to reopen in case of further question