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

Set logger in Benchcab object #281

Merged
merged 1 commit into from
Apr 29, 2024
Merged

Set logger in Benchcab object #281

merged 1 commit into from
Apr 29, 2024

Conversation

SeanBryan51
Copy link
Collaborator

@SeanBryan51 SeanBryan51 commented Apr 12, 2024

Running benchcab without the -v flag is still providing DEBUG log output when we should only output INFO log output. This is because get_logger() is being called for the first time here:

self.logger = get_logger()

Instead of here:

_ = args.pop("verbose")

This change instantiates the logger in main.py and sets the logger object in the Benchcab application object so that the correct debug level is used.

Fixes #280

@SeanBryan51 SeanBryan51 linked an issue Apr 12, 2024 that may be closed by this pull request
Copy link

codecov bot commented Apr 12, 2024

Codecov Report

Attention: Patch coverage is 7.40741% with 50 lines in your changes are missing coverage. Please review.

Project coverage is 70.12%. Comparing base (59910ed) to head (b61da19).
Report is 4 commits behind head on main.

Files Patch % Lines
src/benchcab/benchcab.py 7.40% 50 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #281      +/-   ##
==========================================
- Coverage   72.81%   70.12%   -2.69%     
==========================================
  Files          18       18              
  Lines         982      984       +2     
==========================================
- Hits          715      690      -25     
- Misses        267      294      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SeanBryan51 SeanBryan51 marked this pull request as ready for review April 16, 2024 00:11
@SeanBryan51 SeanBryan51 force-pushed the 280-debug-log-output branch 2 times, most recently from 4aa2aec to 4536bbf Compare April 16, 2024 00:18
@SeanBryan51 SeanBryan51 requested review from a team and abhaasgoyal and removed request for a team April 16, 2024 00:27
src/benchcab/main.py Outdated Show resolved Hide resolved
@SeanBryan51 SeanBryan51 changed the title Set debug level explicitly when parsing options Set logger in Benchcab object Apr 24, 2024
Copy link

@abhaasgoyal abhaasgoyal left a comment

Choose a reason for hiding this comment

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

@SeanBryan51 SeanBryan51 merged commit 9034b12 into main Apr 29, 2024
2 of 4 checks passed
@SeanBryan51 SeanBryan51 deleted the 280-debug-log-output branch April 29, 2024 01:29
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.

Running benchcab without -v is still providing DEBUG log output.
2 participants