DataDog / datadogpy

The Datadog Python library
https://datadoghq.com/
Other
612 stars 302 forks source link

Disable info log around https://api.datadoghq.com/api/v1/series #758

Open daisy1754 opened 1 year ago

daisy1754 commented 1 year ago

Is your feature request related to a problem? Please describe. Our logging cost is getting high and after short investigation I found that most frequent log is coming from datadog library

2023-02-23 13:54:24,981 - datadog.api - INFO - 202 POST https://api.datadoghq.com/api/v1/series (34.0617ms)

Describe the solution you'd like We want to disable above log without disabling entire INFO log

Describe alternatives you've considered We could set logger's log level to WARN but that way we'll lose our own INFO log

Additional context Add any other context or screenshots about the feature request here.

therve commented 1 year ago

You can silent datadog logs with logging.getLogger("datadog.api").setLevel(logging.WARNING). It shouldn't impact your own logs.

github-actions[bot] commented 1 year ago

Thanks for your contribution!

This issue has been automatically marked as stale because it has not had activity in the last 30 days. Note that the issue will not be automatically closed, but this notification will remind us to investigate why there's been inactivity. Thank you for participating in the Datadog open source community.

If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of this project.

  2. Comment that the issue is still reproducible and include updated details requested in the issue template.