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.
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.
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:
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.
switch to the tracing subsystem of mbed
00fd117
intomain
fromWIP_tracing
on 30 Mar 2023I 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.