A little set of macro definitions for comfortable print debug, warning, error and log messages. And another messages.
- Print debug messages only if you compile your application in debug mode. (DEBUG macro definition added in the compiler options)
- Print log messages in format "Log: Log message...
- Print warning messages in format "Warning: Warning message..."
- Print error messages in format "Error: Error message..."
- Just add module in your project.
- Then just include dbgm.h file into your module where you want print messages.
- Define DEBUG macro (for use DEBUG_PRINT) in your source files or in your compile options (actualy it difined by default in compile debug configuration).
- Define LOG macro (for use LOG_PRINT, ERROR_PRINT and WARNING) in your source files or in your cmpiler options.
- Use macroses where you need.
- If need can redefine print function (for examplr redirect to UART).
It usefull to create configurations DEBUG and RELEASE.
For example:
In DEBUG configuration add DEBUG and LOG macroses to compiler options. In RELEASE configuration add just LOG macro to compiler options.
So you won't need remove your debug messages in release build.