Printf Style |
Top Previous Next |
Basic printf-style debug logging statements look like this: dbprintf("This is a debugging message."); dbprintf("There are %d items.",count);
But you can also specify more information in your dbprintf (aka JrDebugPrintf) function calls, which add useful information to your debugging statements. To get the most out of JrDebugLogger you should learn to specify this additional information.
Some examples of providing additional information: // add message type: dbprintf(JrdWarning,"This is a debugging message."); // add message type and severity level: dbprintf(JrdWarning,100,"This is a debugging message."); // add message type, subtypestring, current activity, and severity level: dbprintf(JrdError,"minor","testing",100,"This is a debugging message.");
This extra information is mainly just to help you identify the messages - and shows up as different columns in the Debug Monitor Viewer. However some of these extra fields can be used to control logging behavior:
Prototypes for dbprintf:
Message types are specified with the JrdType enum:
enum JrdType { JrdMessage, JrdWarning, JrdError, JrdAlarm, JrdNote , JrdTest , JrdCustom , JrdAssertPass, JrdAssertFail, JrdException };
Special handling of Message Types:
|