Issues debug statements.
void INKDebug (const char
*tag
, const char
*format_str
, ...)
tag
is the Traffic Server parameter
that enables Traffic Server to print out
format_str
...
is a variable for
format_str
If debugging is enabled, then INKDebug
prints out the statement
. There are two
ways to enable debugging:format_str
Run Traffic Server with the
-Ttag
option.
For example, if the tag
is
my-plugin: traffic_server -Tmy-plugin
then the debug output goes to
traffic.out
Set the
following variables in records.config
(in the Traffic Server config
directory):
proxy.config.diags.debug.enabled INT 1 proxy.config.diags.debug.tags STRING debug-tag-name
In this case, debug output goes to
traffic.out
INKDebug ("my-plugin", “Starting my-plugin at %d\n”,
the_time);
The statement “Starting my-plugin at <time>”
appears whenever you
run Traffic Server with the my-plugin
tag:
traffic_server -Tmy-plugin