SolidWallOfCode / txn_box

Transaction Box - a transaction tool box plugin for Apache Traffic Server
Apache License 2.0
8 stars 8 forks source link

Improve performance of debug trace output #91

Open ywkaras opened 1 year ago

ywkaras commented 1 year ago

Yahoo Prod is requesting that debug trace output use TSDbg() rather than TSDebug(). If support for obsolete release of TS is necessary, the following approach can be used:

#if defined(TSDbg)

const TSDbgCtl *dbg_ctl_yada = TSDbgCtlCreate("yada");
#define DBG_YADA(...) TSDbg(dbg_ctl_yada, __VA_ARGS__)

#else // For obsolete release of TS.

#define DBG_YADA(...) TSDebug("yada", __VA_ARGS__)

#endif