aws-powertools / powertools-lambda-python

A developer toolkit to implement Serverless best practices and increase developer velocity.
https://docs.powertools.aws.dev/lambda/python/latest/
MIT No Attribution
2.81k stars 389 forks source link

Docs: Clarify warning around using `clear_state=True` with Logger() when using Powertools as a Lambda layer vs using other Lambda layers #4458

Open ChrisHills463 opened 3 months ago

ChrisHills463 commented 3 months ago

What were you searching in the docs?

I was reading about Logger()

Is this related to an existing documentation section?

https://docs.powertools.aws.dev/lambda/python/latest/core/logger/#clearing-all-state

How can we improve?

The documentation contains a warning Danger: This can have unintended side effects if you use Layers however I believe this relates to using other layers as opposed to using the Powertools layer itself.

Got a suggestion in mind?

Something like...

Danger: This can have unintended side effects if you use Layers other than Powertools.

Acknowledgment

sthulb commented 3 months ago

Hi @ChrisHills463,

The docs are correct, it affects us – we should probably change the wording though here with what it actually affects.

heitorlessa commented 2 months ago

Assigning to release it this Thursday