switch to the tracing subsystem of mbed #12

Merged xogium merged 3 commits into LuminaSensum:main from LuminaSensum:WIP_tracing on 30 Mar 2023
@xogium xogium commented on 30 Mar 2023

This enables use of the mbed tracing subsystem for the entire source
code of the project. All the uses of printfs are now appropriately
tagged and assigned a trace level, as in the following example:

[INFO][FS]: Unmounting the filesystem...
[INFO][FS]: OK
[INFO][USBM]: Switching to the usb mass storage mode...
[INFO][USBM]: Disconnecting the usb mass storage device...
[INFO][USBM]: Switched usb mass storage mode off.
[INFO][FS]: Mounting the filesystem...
[INFO][FS]: OK

This was also done in a way that the tracing is thread safe, using a
mutex to lock and unlock as needed.

Currently, it is only possible to toggle tracing on or off, it is not
possible to adjust the tracing level.

@xogium xogium referenced the pull request on 30 Mar 2023

switch to the tracing subsystem of mbed

@xogium xogium merged commit 00fd117 into main from WIP_tracing on 30 Mar 2023
@xogium xogium closed this pull request on 30 Mar 2023

I deleted the WIP branch for now, but nothing is preventing us from coming back to this later on to add control over the tracing level. But this should be good enough for a while.

Labels

Priority
default
Milestone
No milestone
Assignee

1 participant
@xogium