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

feat: User can set exact provider log level using environment variable #2169

Conversation

VladimirFilonov
Copy link
Contributor

Closes #2149

๐Ÿ“‘ Description

Variable name: KEEP_PROVIDER_{}_LOG_LEVEL

โœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

โ„น Additional Information

Copy link

vercel bot commented Oct 12, 2024

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
keep โฌœ๏ธ Ignored (Inspect) Visit Preview Oct 16, 2024 6:53am

@VladimirFilonov VladimirFilonov force-pushed the feature/2149-allow-to-change-provider-logger-level-via-provider_provider_name_log_level branch from c9e8361 to 07ae457 Compare October 12, 2024 16:12
Copy link

codecov bot commented Oct 12, 2024

Codecov Report

All modified and coverable lines are covered by tests โœ…

Project coverage is 70.77%. Comparing base (7d90ae9) to head (905e518).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2169      +/-   ##
==========================================
- Coverage   71.20%   70.77%   -0.43%     
==========================================
  Files         154      156       +2     
  Lines       14046    14250     +204     
==========================================
+ Hits        10002    10086      +84     
- Misses       4044     4164     +120     

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

Copy link
Member

@talboren talboren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why are we using this in BaseProvider:
self.logger = context_manager.get_logger()
and not
self.logger = logging.getLogger(__name__)
(I guess it's for automatic context, which can be achieved in other ways too)
But the easiest way to achieve what we're doing here in a "safer" way, is to have some way to add configuration to our logger via environment variables in logging.py

cc @shahargl @VladimirFilonov wdyt?

@talboren
Copy link
Member

image

@VladimirFilonov VladimirFilonov force-pushed the feature/2149-allow-to-change-provider-logger-level-via-provider_provider_name_log_level branch from c625430 to 3596efd Compare October 15, 2024 12:59
@shahargl shahargl self-requested a review October 16, 2024 06:57
Copy link
Member

@shahargl shahargl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

Copy link
Member

@talboren talboren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@talboren talboren merged commit ac9cc2c into main Oct 16, 2024
12 checks passed
@talboren talboren deleted the feature/2149-allow-to-change-provider-logger-level-via-provider_provider_name_log_level branch October 16, 2024 08:24
Copy link
Contributor

๐ŸŒŸ Incredible, @VladimirFilonov! You've merged your 28th PR! ๐ŸŽฏ๐ŸŽŠ

Your ongoing commitment to keep is truly remarkable. You're a driving force in our community! ๐Ÿš€
Your contributions are helping to shape the future of this project. What exciting features or improvements do you envision next? ๐Ÿ”ฎ

@talboren and the entire team are grateful for your dedication. You're an inspiration to us all! ๐Ÿ’ซ

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

Successfully merging this pull request may close these issues.

[โž• Feature]: Allow to change provider logger level via PROVIDER_{PROVIDER_NAME}_LOG_LEVEL
3 participants