Well,
The macro allow you to print a debug message which has the filename, line number and the function name. this macro can be enable/disabled using
#define APP_NO_DEBUG_MESSAGES
#define APP_NO_DEBUG_MESSAGES
To copy to clipboard, switch view to plain text mode
You can disble/enable the Filename, Function name and the line number
Both the function name and the filename can be short or more descriptive
# define DEBUG_PRINT_FILEPATH
# define DEBUG_PRINT_SHORT_FN_NAME
# define DEBUG_PRINT_LINENUMBER
# define DEBUG_PRINT_FILEPATH
# define DEBUG_PRINT_SHORT_FN_NAME
# define DEBUG_PRINT_LINENUMBER
To copy to clipboard, switch view to plain text mode
The output is aligned and the width of the field can be configured
// file name
# define DEBUG_FILEPATH_LENGTH 27
# define DEBUG_FILENAME_LENGTH 22
#
// Function
#
# define DEBUG_LONG_FUNCTION_LENGTH 40
#
# define DEBUG_SHORT_FUNCTION_LENGTH 25
#
// LineNumber
#
# define DEBUG_LINENUMBER_LENGTH 4
// file name
# define DEBUG_FILEPATH_LENGTH 27
# define DEBUG_FILENAME_LENGTH 22
#
// Function
#
# define DEBUG_LONG_FUNCTION_LENGTH 40
#
# define DEBUG_SHORT_FUNCTION_LENGTH 25
#
// LineNumber
#
# define DEBUG_LINENUMBER_LENGTH 4
To copy to clipboard, switch view to plain text mode
so for line
void foo(){
DEBUG() << "I am here ";
}
void foobar(){
DEBUG() << "Yupppy ";
}
void foo(){
DEBUG() << "I am here ";
}
void foobar(){
DEBUG() << "Yupppy ";
}
To copy to clipboard, switch view to plain text mode
the output would be
src/filename.cpp [ 2] void foo() : "I am here "
src/filename.cpp [ 6] void foobar() : "Yuppy"
src/filename.cpp [ 2] void foo() : "I am here "
src/filename.cpp [ 6] void foobar() : "Yuppy"
To copy to clipboard, switch view to plain text mode
Since the output is aligned, it is easier to comprehend
Bookmarks