Skip to content

CircuitPython Logger fixes #3065

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
Jun 20, 2025
Merged

CircuitPython Logger fixes #3065

merged 2 commits into from
Jun 20, 2025

Conversation

FoamyGuy
Copy link
Collaborator

There were people on discord having some trouble with the uart logging example. In testing I discovered that all 3 uart, ble, and aio had a few issues with them. The bundles downloaded from the learn guide do not work as-is.

They seem to have been refactored at some point to not have proper filenames for ble_handler.py, uart_handler.py, and aio_handler.py which caused the example code not to work since it was trying to import from files with those names.

The handler classes needed to call super().__init__() because without it self.level does not get initialized which leads to an exception raised during handle(). Since the parent class Handler accepts a level argument I added that to each of the subclasses.

The ble_handler seemed to be targeting an older version of adafruit_ble library. I updated a handful of lines to get things working under the current version of the library.

.circuitpython.skip was removed so that actions will run black/pylint on these files, which led to some formatting changes in many of them.

Once this is merged I will update the learn guide page embeds and verify that the new file structure results in bundle downloads that can run on device without modification.

I tested with following hardware:

  • uart handler on Feather S3
  • AIO handler on PyPortal
  • BLE handler on CircuitPlayground Bluefruit

@FoamyGuy FoamyGuy merged commit 2b4475b into adafruit:main Jun 20, 2025
4 checks passed
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.

2 participants