Skip to content

Make default logging level be consistent with CPython #41

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

Merged
merged 2 commits into from
Oct 24, 2022
Merged

Make default logging level be consistent with CPython #41

merged 2 commits into from
Oct 24, 2022

Conversation

isacben
Copy link
Contributor

@isacben isacben commented Oct 21, 2022

Hi,

This PR fixes: Make default logging level be consistent with CPython: set to 30 #37

Tested with Adafruit Feather RP2040.

import adafruit_logging

l = adafruit_logging.getLogger()
print("default level: ", l.getEffectiveLevel())

l.debug("Debug message")
l.info("Info message")
l.warning("Warning message")
l.error("Error message")
l.critical("Critical message")

Output:

code.py output:
default level:  30
1534.524: WARNING - Warning message
1534.876: ERROR - Error message
1534.880: CRITICAL - Critical message

Please let me know if you have any comments!

Thanks!

@tekktrik tekktrik linked an issue Oct 23, 2022 that may be closed by this pull request
Copy link
Contributor

@FoamyGuy FoamyGuy left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thanks for taking care of this inconsistency @isacben.

I tested successfully with Feather TFT 8.0.0-beta.2

@FoamyGuy FoamyGuy merged commit 471f0b7 into adafruit:main Oct 24, 2022
@isacben
Copy link
Contributor Author

isacben commented Oct 24, 2022

Thank you, @FoamyGuy !

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Oct 25, 2022
Updating https://github.com/adafruit/Adafruit_CircuitPython_SGP30 to 3.0.6 from 3.0.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_SGP30#40 from tcfranks/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_ImageLoad to 1.16.8 from 1.16.7:
  > Merge pull request adafruit/Adafruit_CircuitPython_ImageLoad#64 from tekktrik/dev/use-unified-workflows

Updating https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation to 2.6.0 from 2.5.20:
  > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#101 from arturo182/patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_Logging to 5.0.0 from 4.2.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_Logging#41 from isacben/fix-default-logging-level
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.

Make default logging level be consistent with CPython: set to 30
2 participants