You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Debugging is important and human readable logs are great but what if we wanted to create automated tooling that processed those logs? Structured logging causes debug output to enter logs in json format making it easier for machines to parse.
Related to this task, I just wanted to link the adafruit_logging documentation alongside its related tutorial. A quick skim of the repo for this, it looks somewhat more limited than the default Python logging api, but it should still work well for our use case.
I think a good place to start would probably be to consider replacing all of the debug_print() and error_print() statements in our code with logging statements instead. One thing to note, due to the limitations of CircuitPython, if we decide we want to log to a file within CircuitPython's internal file system we will first need to solve the issue of how to transition between readonly and non-readonly file systems.
The CIRCUITPY drive is typically writable by your computer; this is what allows you to edit your code directly on the board. The reason you need a boot.py file is that you have to set the filesystem to be read-only by your computer to allow it to be writable by CircuitPython. This is because CircuitPython cannot write to the filesystem at the same time as your computer. Doing so can lead to filesystem corruption and loss of all content on the drive, so CircuitPython is designed to only allow one at at time
Debugging is important and human readable logs are great but what if we wanted to create automated tooling that processed those logs? Structured logging causes debug output to enter logs in json format making it easier for machines to parse.
https://docs.python.org/3/howto/logging-cookbook.html#implementing-structured-logging
Implementing structured logging could allow us to more easily automate something like a radio test between FC boards that runs on every commit.
The text was updated successfully, but these errors were encountered: