powertools-lambda-java icon indicating copy to clipboard operation
powertools-lambda-java copied to clipboard

Log4j2 and Lambda runtime issue which fails logger util in some scenario

Open pankajagrawal16 opened this issue 2 years ago • 1 comments

What were you initially searching for in the docs?

This issue is created via discussions as part of https://github.com/aws-samples/aws-lambda-powertools-examples/issues/67

Is this related to an existing part of the documentation? Please share a link

https://awslabs.github.io/aws-lambda-powertools-java/core/logging/

Describe how we could make it clearer

  • Update docs and samples to specify class names directly when initialising logger. Thats better from cold start perspective anyways.
  • Clarify and address this bit in FAQ section of doc as well with a workaround on what config might be needed, if users still want to depend on log4j to figure out class name.
  • Update all the examples here too https://github.com/aws-samples/aws-lambda-powertools-examples which is using logger without specifying a class name-

If you have a proposed update, please share it here

pankajagrawal16 avatar Apr 08 '22 13:04 pankajagrawal16

Thanks to rieckpil for reporting this. @Klosephi will have a look at fixing the docs, FAQ and other bits

pankajagrawal16 avatar Apr 08 '22 13:04 pankajagrawal16

@Klosephi, any update on this?

jeromevdl avatar Nov 16 '22 08:11 jeromevdl

@jeromevdl I would like to give this a try if this has not been picked up.

jreijn avatar Jul 21 '23 10:07 jreijn

@jreijn, feel free. I think that's an easy one. Just update the doc, have a look at the examples too. And everywhere we use a logger. Not sure you have to spend much more on this, as we'll rewrite the logging module completely in v2.

jeromevdl avatar Jul 21 '23 11:07 jeromevdl

@jeromevdl yes very simple one, but I wanted to pick an easy one to get started :).

jreijn avatar Jul 21 '23 15:07 jreijn