restatedev / documentation

Restate documentation
https://docs.restate.dev
MIT License
5 stars 7 forks source link

Logging on Lambda with log4j2 #184

Closed slinkydeveloper closed 6 months ago

slinkydeveloper commented 11 months ago

Log4j2 has custom appenders for lambda, that the aws docs encourages to use https://docs.aws.amazon.com/lambda/latest/dg/java-logging.html#java-logging-log4j2. We should perhaps investigate those and see whether we need to document them.

slinkydeveloper commented 11 months ago

cc @pcholakov

pcholakov commented 11 months ago

Agreed, this makes sense! Perhaps in the future, we can inject some of these into a higher-level CDK construct for bundling Java- or Kotlin-based Restate Lambda handlers: point it at a class file, it turns it into a Lambda deployment.

slinkydeveloper commented 11 months ago

Note for myself: in the template projects configure aws log4j2 logging directly, rather than console logger.

pcholakov commented 10 months ago

After https://github.com/restatedev/examples/pull/50 is merged, we can update all the other Lambda examples to use the same/similar log4j2 config.

slinkydeveloper commented 6 months ago

Solved