TSC / CCS / MCS

Test - Integrate - Control

Debug Logging

Did you ever have to debug a sequence where fast reaction times did not allow to use the debugger? Did you have to pepper your code with debug logging, but then have to remove it later?

A new argument to syslog helps.

Use syslog -debug to put log messages in test sequence code that can be dynamically enabled and disabled.
The new -debug argument to syslog allows you to put ample debug logging in your test sequence without the risk of flooding the system log with too much detail after debugging has finished. You can safely leave your debug logging in the code, with a single flag to activate or deactivate the logging, in case you ever need to activate it later. There is no performance cost at all if debug logging is deactivated.

If you use syslog -debug you can place messages anywhere in your code and most of the time it will be inactive. The message will never even be generated. But if you turn on debug logging for that sequence you can get all the detail you need to solve a problem.

Generation of debug messages can be controlled or queried from the test sequence itself, using the new command ::utope::debug . If you omit the argument, the current value for this sequence is returned (maybe you want to vary some other behaviour too while debugging).

In the user interface you can right click on any running sequence in the Test Sequence Manager to activate or deactivate debugging.

There is a global flag in the Test Sequence manager to activate/deactivate all debug messages.

These two flags control the generation of the message, if either is off, no message is generated

Finally you can always filter out debug messages from the log window.

There’s also a new syslog flag -ok to log when you think a test has passed. Read about it here.