2021-05-01, 07:09 PM
2021-04-27: Dynamic Prints
A recent addition to y_debug added level -1:
This activates run-time debug level selection, so doing:
Compiles as:
You can then change the level at run-time with:
Disable most printing (except special ones - see above) with:
And get the current debug level with:
A recent addition to y_debug added level -1:
Quote:
#define _DEBUG -1
This activates run-time debug level selection, so doing:
Quote:
P:3("Message");
Compiles as:
Quote:
if (gDebugLevel >= 3) printf("Message");
You can then change the level at run-time with:
Quote:
DebugLevel(3);
Disable most printing (except special ones - see above) with:
Quote:
DebugLevel(0);
And get the current debug level with:
Quote:
new level = DebugLevel();