Skip to content

Fix Logger setLevel not resetting other levels#57

Merged
tonybaloney merged 2 commits into
microsoft:mainfrom
aminalaee:fix-setlevel-reset-other-levels
Aug 9, 2022
Merged

Fix Logger setLevel not resetting other levels#57
tonybaloney merged 2 commits into
microsoft:mainfrom
aminalaee:fix-setlevel-reset-other-levels

Conversation

@aminalaee

Copy link
Copy Markdown
Contributor

Fixes #56

At first I thought it should only reset lower levels, which is a bit less verbose, but it should also reset higher levels:

for example:

logger.setLevel(picologging.INFO)

# This should enable levels ERROR and CRITICAL but also disable DEBUG, INFO, WARNING
logger.setLevel(picologging.ERROR)

@aminalaee aminalaee changed the title Fix setLevel not resetting other levels Fix Logger setLevel not resetting other levels Aug 5, 2022
@aminalaee
aminalaee force-pushed the fix-setlevel-reset-other-levels branch from d5775ea to f0811c4 Compare August 5, 2022 13:58
Comment thread src/picologging/logger.cxx Outdated
Comment thread src/picologging/logger.cxx Outdated

@tonybaloney tonybaloney left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

see comments

@aminalaee
aminalaee force-pushed the fix-setlevel-reset-other-levels branch from b2ee1d1 to f144044 Compare August 8, 2022 08:45
@aminalaee
aminalaee force-pushed the fix-setlevel-reset-other-levels branch from f144044 to af2afa0 Compare August 8, 2022 08:46
@codecov-commenter

codecov-commenter commented Aug 8, 2022

Copy link
Copy Markdown

Codecov Report

Merging #57 (0220afa) into main (7a68c06) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #57      +/-   ##
==========================================
+ Coverage   86.28%   86.39%   +0.10%     
==========================================
  Files          10       10              
  Lines        1881     1896      +15     
==========================================
+ Hits         1623     1638      +15     
  Misses        258      258              
Impacted Files Coverage Δ
src/picologging/logger.cxx 82.28% <100.00%> (+0.75%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@aminalaee
aminalaee force-pushed the fix-setlevel-reset-other-levels branch from af2afa0 to 480aa10 Compare August 8, 2022 08:50
@aminalaee
aminalaee force-pushed the fix-setlevel-reset-other-levels branch from 480aa10 to 0220afa Compare August 8, 2022 08:51
@tonybaloney

Copy link
Copy Markdown
Collaborator

thanks for the patch!

@tonybaloney
tonybaloney merged commit 844e121 into microsoft:main Aug 9, 2022
@aminalaee
aminalaee deleted the fix-setlevel-reset-other-levels branch August 9, 2022 07:32
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.

Issue with setLevel not resetting other levels

3 participants