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
Introduce a module src/logger to hide complexity of switching between TEST/RELEASE version of logging, also provides the interface to introduce functionality for FLASH/DISK logging behavior (when drivers are available).
One imagines a common interface like:
/* Single main logging function * Parameters: * LOG_LEVEL: DEBUG/INFO/ERROR * SINK_BITMASK: 0bxyz (x - FLASH, y - DISK, z - TEST) * fmt: printf-like format string * args: variable args */voidlog(enumLOG_LEVEL, uint8SINK_BITMASK, char*fmt, args...)
// Macros for convenience & backward compatibility with current code// Notice the `| TEST` bitwise operator here to automatically enable TESTING mode based on// define flag passed through from cmake build commands.LOG_DEBUG(fmt, ...) \
log(DEBUG, 0b010 | TEST, "[DEBUG] " fmt"\n"__VA_OPT__(, ) __VA_ARGS__)
The text was updated successfully, but these errors were encountered:
Introduce a module
src/logger
to hide complexity of switching between TEST/RELEASE version of logging, also provides the interface to introduce functionality for FLASH/DISK logging behavior (when drivers are available).One imagines a common interface like:
The text was updated successfully, but these errors were encountered: