Obtaining trace of TiNG API calls

There is a global variable 'TiNGtrace' which can be set anywhere in an application where trace is required. It is an integer that can be set between 0 and 3 to enable different trace granularity. One registers only API calls while three offers very accurate trace on the driver. Zero disables tracing. All trace is written to stdout by default.

To output this trace information to a separate text file in versions of TiNG prior to 2.13.0m1016 create a function with this prototype:

  • STATIC void function_name(char *fmt, ...);

Next redirect the global TiNG function pointer variable TiNG_output to the custom function. The default TiNG output function is olog_stdout(), this can be consulted as a guide to writing the custom logging function.

In TiNG version 2.13.0m1016 and above the function prototype is:

  • int function_name(char *fmt, va_list ap);

and the TiNG global function pointer is now TiNG_showtrace rather than TiNG_output.