diff --git a/doc/developer-guide/api/functions/TSDebug.en.rst b/doc/developer-guide/api/functions/TSDebug.en.rst index a12551001bc..9a458bfd0de 100644 --- a/doc/developer-guide/api/functions/TSDebug.en.rst +++ b/doc/developer-guide/api/functions/TSDebug.en.rst @@ -40,6 +40,7 @@ Synopsis .. type:: TSDbgCtl .. function:: void TSDbg(const TSDbgCtl * ctlptr, const char * format, ...) .. function:: const TSDbgCtl * TSDbgCtlCreate(const char * tag) +.. function:: void TSDbgCtlDestroy(const TSDbgCtl * dbg_ctl) .. function:: void TSDebug(const char * tag, const char * format, ...) .. function:: int TSIsDbgCtlSet(const TSDbgCtl * ctlptr) .. function:: int TSIsDebugTagSet(const char * tag) @@ -86,6 +87,8 @@ trafficserver.out :func:`TSDbgCtlCreate` creates a debug control, associated with the debug :arg:`tag`, and returns a const pointer to it. +:func:`TSDbgCtlDestroy` destroys a debug control, pointed to by :arg:`dbg_ctl`. + :func:`TSIsDbgCtlSet` returns non-zero if the given debug control, pointed to by :arg:`ctlptr`, is enabled. diff --git a/doc/developer-guide/debugging/debug-tags.en.rst b/doc/developer-guide/debugging/debug-tags.en.rst index 9cd45392de1..d15d4c33a23 100644 --- a/doc/developer-guide/debugging/debug-tags.en.rst +++ b/doc/developer-guide/debugging/debug-tags.en.rst @@ -32,11 +32,14 @@ traces in your plugin. In this macro: - ``...`` are variables for ``format_str`` in the standard ``printf`` style. -``void TSDbgCtlCreate (const char *tag)`` returns a (const) pointer to +``TSDbgCtlCreate (const char *tag)`` returns a (const) pointer to ``TSDbgCtl``. The ``TSDbgCtl`` control is enabled when debug output is -enabled globally by configuaration, and ``tag`` matches a configured +enabled globally by configuration, and ``tag`` matches a configured regular expression. +``TSDbgCtlDestroy (TSDbgCtl const *dbg_ctl)`` destroys a debug control +created by ``TSDbgCtlCreast()``. + The deprecated API ``void TSDebug (const char *tag, const char *format_str, ...)`` also outputs traces. In this API: @@ -81,6 +84,8 @@ Example: TSDbg(my_dbg_ctl, "Starting my-plugin at %d", the_time); ... TSDbg(my_dbg_ctl, "Later on in my-plugin"); + ... + TSDbgCtlDestroy(my_dbg_ctl); The statement ``"Starting my-plugin at