CircuitPython Logger fixes #3065
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 itself.level
does not get initialized which leads to an exception raised duringhandle()
. Since the parent class Handler accepts alevel
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: