Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure standard python logging #836

Closed
houbie opened this issue Nov 19, 2021 · 2 comments
Closed

configure standard python logging #836

houbie opened this issue Nov 19, 2021 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@houbie
Copy link
Contributor

houbie commented Nov 19, 2021

What were you initially searching for in the docs?
I want to turn on logging of (3th party) libraries that use standard logging.

Is this related to an existing part of the documentation? Please share a link
The FAQ explains how to enable logging for boto3, but not for other libraries using standard logging.

Describe how we could make it clearer

  • How should one configure standard logging to make it available in cloudwatch?
  • Is it possible to output standard logs in the same way as the power tools logger (structured logs)?
@houbie houbie added the documentation Improvements or additions to documentation label Nov 19, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Nov 19, 2021

Thanks for opening your first issue here! We'll come back to you as soon as we can.

@heitorlessa
Copy link
Contributor

hey @houbie - thanks for reaching out! We have that on the roadmap and will start working on it next week: aws-powertools/powertools-lambda#40

As a common practice, every library should define a way to enable its logging and should be disabled by default with no formatting.

Since this is becoming a common feature request (please add +1 there), we'll add a new method which will allow you to copy Powertools Logger to any registered Python logging library. This method will allow you to specify the 3rd party libraries ones you don't want to touch, and we will set the same or different Log Level and same JSON formatting you are using in Powertools Logger.

Please do reopen if I misunderstood it completely.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants