transform header_rewrite to new logging non-API
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/9800aa92 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/9800aa92 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/9800aa92 Branch: refs/heads/consistent-gzip-error-msgs Commit: 9800aa9219f87f8ea83faf4c9c1be56fdcbef571 Parents: 4e5cfae Author: Igor GaliÄ <[email protected]> Authored: Thu Aug 8 19:10:57 2013 +0200 Committer: Igor GaliÄ <[email protected]> Committed: Thu Aug 8 19:39:03 2013 +0200 ---------------------------------------------------------------------- plugins/header_rewrite/condition.cc | 2 +- plugins/header_rewrite/condition.h | 2 +- plugins/header_rewrite/conditions.cc | 40 ++++++++++----------- plugins/header_rewrite/conditions.h | 24 ++++++------- plugins/header_rewrite/factory.cc | 4 +-- plugins/header_rewrite/header_rewrite.cc | 40 ++++++++++----------- plugins/header_rewrite/lulu.h | 4 +-- plugins/header_rewrite/matcher.h | 10 +++--- plugins/header_rewrite/operator.h | 2 +- plugins/header_rewrite/operators.cc | 52 +++++++++++++-------------- plugins/header_rewrite/operators.h | 16 ++++----- plugins/header_rewrite/parser.cc | 6 ++-- plugins/header_rewrite/resources.cc | 24 ++++++------- plugins/header_rewrite/resources.h | 6 ++-- plugins/header_rewrite/ruleset.cc | 8 ++--- plugins/header_rewrite/statement.h | 4 +-- plugins/header_rewrite/value.h | 2 +- 17 files changed, 121 insertions(+), 125 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/condition.cc ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/condition.cc b/plugins/header_rewrite/condition.cc index 5180962..9ee323c 100644 --- a/plugins/header_rewrite/condition.cc +++ b/plugins/header_rewrite/condition.cc @@ -60,7 +60,7 @@ Condition::initialize(Parser& p) if (p.mod_exist("OR")) { if (p.mod_exist("AND")) { - TSError("header_rewrite: Can't have both AND and OR in mods"); + TSLogError("Can't have both AND and OR in mods"); } else { _mods = static_cast<CondModifiers>(_mods | COND_OR); } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/condition.h ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/condition.h b/plugins/header_rewrite/condition.h index e832a87..9393ff0 100644 --- a/plugins/header_rewrite/condition.h +++ b/plugins/header_rewrite/condition.h @@ -52,7 +52,7 @@ public: Condition() : _qualifier(""), _cond_op(MATCH_EQUAL), _matcher(NULL), _mods(COND_NONE) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for Condition"); + TSLogDebug("Calling CTOR for Condition"); } // Inline this, it's critical for speed (and only used twice) http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/conditions.cc ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/conditions.cc b/plugins/header_rewrite/conditions.cc index 84ad1f0..c541267 100644 --- a/plugins/header_rewrite/conditions.cc +++ b/plugins/header_rewrite/conditions.cc @@ -54,7 +54,7 @@ ConditionStatus::initialize_hooks() { bool ConditionStatus::eval(const Resources& res) { - TSDebug(PLUGIN_NAME, "Evaluating STATUS()"); // TODO: It'd be nice to get the args here ... + TSLogDebug("Evaluating STATUS()"); // TODO: It'd be nice to get the args here ... return static_cast<const Matchers<TSHttpStatus>*>(_matcher)->test(res.resp_status); } @@ -62,7 +62,7 @@ ConditionStatus::eval(const Resources& res) { void ConditionStatus::append_value(std::string& s, const Resources& res) { s += boost::lexical_cast<std::string>(res.resp_status); - TSDebug(PLUGIN_NAME, "Appending STATUS(%d) to evaluation value -> %s", res.resp_status, s.c_str()); + TSLogDebug("Appending STATUS(%d) to evaluation value -> %s", res.resp_status, s.c_str()); } @@ -87,7 +87,7 @@ ConditionRandom::initialize(Parser& p) bool ConditionRandom::eval(const Resources& /* res ATS_UNUSED */) { - TSDebug(PLUGIN_NAME, "Evaluating RANDOM(%d)", _max); + TSLogDebug("Evaluating RANDOM(%d)", _max); return static_cast<const Matchers<unsigned int>*>(_matcher)->test(rand_r(&_seed) % _max); } @@ -96,7 +96,7 @@ void ConditionRandom::append_value(std::string& s, const Resources& /* res ATS_UNUSED */) { s += boost::lexical_cast<std::string>(rand_r(&_seed) % _max); - TSDebug(PLUGIN_NAME, "Appending RANDOM(%d) to evaluation value -> %s", _max, s.c_str()); + TSLogDebug("Appending RANDOM(%d) to evaluation value -> %s", _max, s.c_str()); } @@ -133,7 +133,7 @@ ConditionAccess::eval(const Resources& /* res ATS_UNUSED */) gettimeofday(&tv, NULL); - TSDebug(PLUGIN_NAME, "Evaluating ACCESS(%s)", _qualifier.c_str()); + TSLogDebug("Evaluating ACCESS(%s)", _qualifier.c_str()); if (tv.tv_sec > _next) { // There is a small "race" here, where we could end up calling access() a few times extra. I think // that is OK, and not worth protecting with a lock. @@ -186,10 +186,10 @@ ConditionHeader::append_value(std::string& s, const Resources& res) if (bufp && hdr_loc) { field_loc = TSMimeHdrFieldFind(bufp, hdr_loc, _qualifier.c_str(), _qualifier.size()); - TSDebug(PLUGIN_NAME, "Getting Header: %s, field_loc: %p", _qualifier.c_str(), field_loc); + TSLogDebug("Getting Header: %s, field_loc: %p", _qualifier.c_str(), field_loc); if (field_loc != NULL) { value = TSMimeHdrFieldValueStringGet(res.bufp, res.hdr_loc, field_loc, 0, &len); - TSDebug(PLUGIN_NAME, "Appending HEADER(%s) to evaluation value -> %.*s", _qualifier.c_str(), len, value); + TSLogDebug("Appending HEADER(%s) to evaluation value -> %.*s", _qualifier.c_str(), len, value); s.append(value, len); TSHandleMLocRelease(res.bufp, res.hdr_loc, field_loc); } @@ -204,7 +204,7 @@ ConditionHeader::eval(const Resources& res) append_value(s, res); bool rval = static_cast<const Matchers<std::string>*>(_matcher)->test(s); - TSDebug(PLUGIN_NAME, "Evaluating HEADER(): %s - rval: %d", s.c_str(), rval); + TSLogDebug("Evaluating HEADER(): %s - rval: %d", s.c_str(), rval); return rval; } @@ -225,7 +225,7 @@ ConditionPath::append_value(std::string& s, const Resources& res) { int path_len = 0; const char *path = TSUrlPathGet(res._rri->requestBufp, res._rri->requestUrl, &path_len); - TSDebug(PLUGIN_NAME, "Appending PATH to evaluation value: %.*s", path_len, path); + TSLogDebug("Appending PATH to evaluation value: %.*s", path_len, path); s.append(path, path_len); } @@ -235,11 +235,11 @@ ConditionPath::eval(const Resources& res) std::string s; if (NULL == res._rri) { - TSDebug(PLUGIN_NAME, "PATH requires remap initialization! Evaluating to false!"); + TSLogDebug("PATH requires remap initialization! Evaluating to false!"); return false; } append_value(s, res); - TSDebug(PLUGIN_NAME, "Evaluating PATH"); + TSLogDebug("Evaluating PATH"); return static_cast<const Matchers<std::string>*>(_matcher)->test(s); } @@ -261,7 +261,7 @@ ConditionQuery::append_value(std::string& s, const Resources& res) { int query_len = 0; const char *query = TSUrlHttpQueryGet(res._rri->requestBufp, res._rri->requestUrl, &query_len); - TSDebug(PLUGIN_NAME, "Appending QUERY to evaluation value: %.*s", query_len, query); + TSLogDebug("Appending QUERY to evaluation value: %.*s", query_len, query); s.append(query, query_len); } @@ -271,11 +271,11 @@ ConditionQuery::eval(const Resources& res) std::string s; if (NULL == res._rri) { - TSDebug(PLUGIN_NAME, "QUERY requires remap initialization! Evaluating to false!"); + TSLogDebug("QUERY requires remap initialization! Evaluating to false!"); return false; } append_value(s, res); - TSDebug(PLUGIN_NAME, "Evaluating QUERY - %s", s.c_str()); + TSLogDebug("Evaluating QUERY - %s", s.c_str()); return static_cast<const Matchers<std::string>*>(_matcher)->test(s); } @@ -326,13 +326,13 @@ ConditionDBM::initialize(Parser& p) _file = _qualifier.substr(0, pos); //_dbm = mdbm_open(_file.c_str(), O_RDONLY, 0, 0, 0); // if (NULL != _dbm) { - // TSDebug(PLUGIN_NAME, "Opened DBM file %s\n", _file.c_str()); + // TSLogDebug("Opened DBM file %s\n", _file.c_str()); // _key.set_value(_qualifier.substr(pos + 1)); // } else { - // TSError("Failed to open DBM file: %s", _file.c_str()); + // TSLogError("Failed to open DBM file: %s", _file.c_str()); // } } else { - TSError("Malformed DBM condition"); + TSLogError("Malformed DBM condition"); } } @@ -349,7 +349,7 @@ ConditionDBM::append_value(std::string& /* s ATS_UNUSED */, const Resources& /* // if (key.size() > 0) { // datum k, v; - // TSDebug(PLUGIN_NAME, "Looking up DBM(\"%s\")", key.c_str()); + // TSLogDebug("Looking up DBM(\"%s\")", key.c_str()); // k.dptr = const_cast<char*>(key.c_str()); // k.dsize = key.size(); @@ -357,7 +357,7 @@ ConditionDBM::append_value(std::string& /* s ATS_UNUSED */, const Resources& /* // //v = mdbm_fetch(_dbm, k); // TSMutexUnlock(_mutex); // if (v.dsize > 0) { - // TSDebug(PLUGIN_NAME, "Appending DBM(%.*s) to evaluation value -> %.*s", k.dsize, k.dptr, v.dsize, v.dptr); + // TSLogDebug("Appending DBM(%.*s) to evaluation value -> %.*s", k.dsize, k.dptr, v.dsize, v.dptr); // s.append(v.dptr, v.dsize); // } // } @@ -370,7 +370,7 @@ ConditionDBM::eval(const Resources& res) std::string s; append_value(s, res); - TSDebug(PLUGIN_NAME, "Evaluating DBM(%s, \"%s\")", _file.c_str(), s.c_str()); + TSLogDebug("Evaluating DBM(%s, \"%s\")", _file.c_str(), s.c_str()); return static_cast<const Matchers<std::string>*>(_matcher)->test(s); } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/conditions.h ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/conditions.h b/plugins/header_rewrite/conditions.h index 904533d..922550f 100644 --- a/plugins/header_rewrite/conditions.h +++ b/plugins/header_rewrite/conditions.h @@ -43,14 +43,14 @@ class ConditionTrue : public Condition public: ConditionTrue() { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for ConditionTrue"); + TSLogDebug("Calling CTOR for ConditionTrue"); } void append_value(std::string& s, const Resources& /* res ATS_UNUSED */) { s += "TRUE"; } protected: bool eval(const Resources& /* res ATS_UNUSED */) { - TSDebug(PLUGIN_NAME, "Evaluating TRUE()"); + TSLogDebug("Evaluating TRUE()"); return true; } @@ -65,13 +65,13 @@ class ConditionFalse : public Condition public: ConditionFalse() { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for ConditionFalse"); + TSLogDebug("Calling CTOR for ConditionFalse"); } void append_value(std::string& s, const Resources& /* res ATS_UNUSED */) { s += "FALSE"; } protected: bool eval(const Resources& /* res ATS_UNUSED */) { - TSDebug(PLUGIN_NAME, "Evaluating FALSE()"); + TSLogDebug("Evaluating FALSE()"); return false; } @@ -86,7 +86,7 @@ class ConditionStatus : public Condition public: ConditionStatus() { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for ConditionStatus"); + TSLogDebug("Calling CTOR for ConditionStatus"); } void initialize(Parser& p); void append_value(std::string& s, const Resources& res); @@ -107,7 +107,7 @@ public: ConditionRandom() : _seed(0), _max(0) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for ConditionRandom"); + TSLogDebug("Calling CTOR for ConditionRandom"); } void initialize(Parser& p); void append_value(std::string& s, const Resources& res); @@ -130,7 +130,7 @@ public: ConditionAccess() : _next(0), _last(false) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for ConditionAccess"); + TSLogDebug("Calling CTOR for ConditionAccess"); } void initialize(Parser& p); void append_value(std::string& s, const Resources& res); @@ -153,7 +153,7 @@ public: explicit ConditionHeader(bool client = false) : _client(client) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for ConditionHeader, client %d", client); + TSLogDebug("Calling CTOR for ConditionHeader, client %d", client); }; void initialize(Parser& p); @@ -174,7 +174,7 @@ class ConditionPath : public Condition public: explicit ConditionPath() { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for ConditionPath"); + TSLogDebug("Calling CTOR for ConditionPath"); }; void initialize(Parser& p); @@ -206,7 +206,7 @@ class ConditionQuery : public Condition public: explicit ConditionQuery() { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for ConditionQuery"); + TSLogDebug("Calling CTOR for ConditionQuery"); }; void initialize(Parser& p); @@ -228,7 +228,7 @@ public: explicit ConditionUrl(bool client = false) : _url_qual(URL_QUAL_NONE), _client(client) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for ConditionUrl"); + TSLogDebug("Calling CTOR for ConditionUrl"); }; void initialize(Parser& p); @@ -256,7 +256,7 @@ public: _file("") { _mutex = TSMutexCreate(); - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for ConditionDBM"); + TSLogDebug("Calling CTOR for ConditionDBM"); } ~ConditionDBM() { http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/factory.cc ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/factory.cc b/plugins/header_rewrite/factory.cc index d20fa40..b9a803e 100644 --- a/plugins/header_rewrite/factory.cc +++ b/plugins/header_rewrite/factory.cc @@ -50,7 +50,7 @@ operator_factory(const std::string& op) } else if (op == "no-op") { o = new OperatorNoOp(); } else { - TSError("header_rewrite: unknown operator in header_rewrite: %s", op.c_str()); + TSLogError("Unknown operator in header_rewrite: %s", op.c_str()); return NULL; } @@ -98,7 +98,7 @@ condition_factory(const std::string& cond) } else if (c_name == "DBM") { c = new ConditionDBM(); } else { - TSError("header_rewrite: unknown condition in header_rewrite: %s",c_name.c_str()); + TSLogError("unknown condition in header_rewrite: %s",c_name.c_str()); return NULL; } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/header_rewrite.cc ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/header_rewrite.cc b/plugins/header_rewrite/header_rewrite.cc index 1300742..35b6d19 100644 --- a/plugins/header_rewrite/header_rewrite.cc +++ b/plugins/header_rewrite/header_rewrite.cc @@ -32,9 +32,6 @@ #include "resources.h" // "Defines" -const char* PLUGIN_NAME = "header_rewrite"; -const char* PLUGIN_NAME_DBG = "header_rewrite_dbg"; - static const char* DEFAULT_CONF_PATH = "/usr/local/etc/header_rewrite/"; @@ -46,7 +43,7 @@ static ResourceIDs all_resids[TS_HTTP_LAST_HOOK+1]; static bool add_rule(RuleSet* rule) { if (rule && rule->has_operator()) { - TSDebug(PLUGIN_NAME, "Adding rule to hook=%d\n", rule->get_hook()); + TSLogDebug("Adding rule to hook=%d\n", rule->get_hook()); if (NULL == all_rules[rule->get_hook()]) { all_rules[rule->get_hook()] = rule; } else { @@ -82,18 +79,18 @@ parse_config(const std::string fname, TSHttpHookID default_hook) f.open(filename.c_str(), std::ios::in); if (!f.is_open()) { - TSError("header_rewrite: unable to open %s", filename.c_str()); + TSLogError("Unable to open %s", filename.c_str()); return false; } - TSDebug(PLUGIN_NAME, "Loading header_rewrite config from %s", filename.c_str()); + TSLogDebug("Loading header_rewrite config from %s", filename.c_str()); while (!f.eof()) { std::string line; getline(f, line); ++lineno; // ToDo: we should probably use this for error messages ... - TSDebug(PLUGIN_NAME, "Reading line: %d: %s", lineno, line.c_str()); + TSLogDebug("Reading line: %d: %s", lineno, line.c_str()); boost::trim(line); if (line.empty() || (line[0] == '#')) @@ -156,7 +153,7 @@ parse_config(const std::string fname, TSHttpHookID default_hook) static int cont_rewrite_headers(TSCont contp, TSEvent event, void *edata) { - TSDebug(PLUGIN_NAME, "plugin: %d", event); + TSLogDebug("plugin: %d", event); TSHttpTxn txnp = (TSHttpTxn) edata; Resources res(txnp, contp); @@ -181,8 +178,7 @@ cont_rewrite_headers(TSCont contp, TSEvent event, void *edata) hook = TS_HTTP_SEND_RESPONSE_HDR_HOOK; break; default: - TSError("header_rewrite: unknown event for this plugin"); - TSDebug(PLUGIN_NAME, "unknown event for this plugin"); + TSLogError("unknown event (%d) for this plugin", event); break; } @@ -221,12 +217,12 @@ TSPluginInit(int argc, const char *argv[]) info.support_email = (char*)""; if (TS_SUCCESS != TSPluginRegister(TS_SDK_VERSION_3_0 , &info)) { - TSError("header_rewrite: plugin registration failed.\n"); + TSLogError("plugin registration failed."); } - TSDebug(PLUGIN_NAME, "number of arguments: %d", argc); + TSLogDebug("number of arguments: %d", argc); if (argc != 2) { - TSError("usage: %s <config-file>\n", argv[0] ); + TSLogError("usage: %s <config-file>", argv[0] ); assert(argc == 2); } @@ -240,12 +236,12 @@ TSPluginInit(int argc, const char *argv[]) if (parse_config(argv[1], TS_HTTP_READ_RESPONSE_HDR_HOOK)) { for (int i=TS_HTTP_READ_REQUEST_HDR_HOOK; i<TS_HTTP_LAST_HOOK; ++i) { if (all_rules[i]) { - TSDebug(PLUGIN_NAME, "adding hook: %d", i); + TSLogDebug("adding hook: %d", i); TSHttpHookAdd(static_cast<TSHttpHookID>(i), TSContCreate(cont_rewrite_headers, NULL)); } } } else { - TSError("header_rewrite: failed to parse configuration file"); + TSLogError("Failed to parse configuration file"); } } @@ -272,7 +268,7 @@ TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size) return TS_ERROR; } - TSDebug(PLUGIN_NAME, "remap plugin is successfully initialized"); + TSLogInfo("remap plugin is successfully initialized"); return TS_SUCCESS; } @@ -280,10 +276,10 @@ TSRemapInit(TSRemapInterface *api_info, char *errbuf, int errbuf_size) TSReturnCode TSRemapNewInstance(int argc, char *argv[], void **ih, char * /* errbuf ATS_UNUSED */, int /* errbuf_size ATS_UNUSED */) { - TSDebug(PLUGIN_NAME, "initializing the remap plugin header_rewrite"); + TSLogDebug("initializing the remap plugin header_rewrite"); if (argc < 3) { - TSError("Unable to create remap instance, need config file"); + TSLogError("Unable to create remap instance, need config file"); return TS_ERROR; } @@ -291,14 +287,14 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char * /* errbuf ATS_UNUSE // remap instantiation. all_rules[TS_REMAP_PSEUDO_HOOK] = NULL; if (!parse_config(argv[2], TS_REMAP_PSEUDO_HOOK)) { - TSError("Unable to create remap instance"); + TSLogError("Unable to create remap instance"); return TS_ERROR; } *ih = all_rules[TS_REMAP_PSEUDO_HOOK]; all_rules[TS_REMAP_PSEUDO_HOOK] = NULL; - TSDebug(PLUGIN_NAME, "successfully initialize the header_rewrite plugin"); + TSLogInfo("successfully initialized plugin"); return TS_SUCCESS; } @@ -320,7 +316,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri) TSRemapStatus rval = TSREMAP_NO_REMAP; if (NULL == ih) { - TSDebug(PLUGIN_NAME, "No Rules configured, falling back to default"); + TSLogDebug("No Rules configured, falling back to default"); return rval; } else { RuleSet* rule = (RuleSet*)ih; @@ -346,7 +342,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri) } - TSDebug(PLUGIN_NAME, "returing with status: %d", rval); + TSLogDebug("returing with status: %d", rval); return rval; } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/lulu.h ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/lulu.h b/plugins/header_rewrite/lulu.h index 99876ec..80bcafc 100644 --- a/plugins/header_rewrite/lulu.h +++ b/plugins/header_rewrite/lulu.h @@ -43,8 +43,8 @@ #error "Define barriers" #endif -extern const char* PLUGIN_NAME; -extern const char* PLUGIN_NAME_DBG; +#define PLUGIN_NAME "header_rewrite" +#include <ts/debug.h> // From google styleguide: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/matcher.h ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/matcher.h b/plugins/header_rewrite/matcher.h index d9648c8..ae8fca6 100644 --- a/plugins/header_rewrite/matcher.h +++ b/plugins/header_rewrite/matcher.h @@ -48,11 +48,11 @@ public: explicit Matcher(const MatcherOps op) : _pdata(NULL), _op(op) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for Matcher"); + TSLogDebug("Calling CTOR for Matcher"); } virtual ~Matcher() { - TSDebug(PLUGIN_NAME_DBG, "Calling DTOR for Matcher"); + TSLogDebug("Calling DTOR for Matcher"); free_pdata(); } @@ -86,7 +86,7 @@ public: std::cout<<"Invalid regex:failed to precompile"<<std::endl; abort(); } - TSDebug(PLUGIN_NAME,"Regex precompiled successfully"); + TSLogDebug("Regex precompiled successfully"); } void setRegex(const unsigned int /* t ATS_UNUSED */) { return; } @@ -148,10 +148,10 @@ private: } bool test_reg(const std::string t) const { - TSDebug(PLUGIN_NAME, "Test regular expression %s : %s", _data.c_str(), t.c_str()); + TSLogDebug("Test regular expression %s : %s", _data.c_str(), t.c_str()); int ovector[OVECCOUNT]; if (helper.regexMatch(t.c_str(), t.length(), ovector) > 0) { - TSDebug(PLUGIN_NAME, "Successfully found regular expression match"); + TSLogDebug("Successfully found regular expression match"); return true; } return false; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/operator.h ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/operator.h b/plugins/header_rewrite/operator.h index f136290..db67202 100644 --- a/plugins/header_rewrite/operator.h +++ b/plugins/header_rewrite/operator.h @@ -48,7 +48,7 @@ public: Operator() : _mods(OPER_NONE) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for Operator"); + TSLogDebug("Calling CTOR for Operator"); } void do_exec(const Resources& res) const { http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/operators.cc ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/operators.cc b/plugins/header_rewrite/operators.cc index 3775166..c2ab9c9 100644 --- a/plugins/header_rewrite/operators.cc +++ b/plugins/header_rewrite/operators.cc @@ -45,10 +45,10 @@ OperatorRMHeader::exec(const Resources& res) const TSMLoc field_loc, tmp; if (res.bufp && res.hdr_loc) { - TSDebug(PLUGIN_NAME, "OperatorRMHeader::exec() invoked on header %s", _header.c_str()); + TSLogDebug("OperatorRMHeader::exec() invoked on header %s", _header.c_str()); field_loc = TSMimeHdrFieldFind(res.bufp, res.hdr_loc, _header.c_str(), _header.size()); while (field_loc) { - TSDebug(PLUGIN_NAME, "\tdeleting header %s", _header.c_str()); + TSLogDebug("\tdeleting header %s", _header.c_str()); tmp = TSMimeHdrFieldNextDup(res.bufp, res.hdr_loc, field_loc); TSMimeHdrFieldDestroy(res.bufp, res.hdr_loc, field_loc); TSHandleMLocRelease(res.bufp, res.hdr_loc, field_loc); @@ -66,7 +66,7 @@ OperatorSetStatus::initialize(Parser& p) { _status.set_value(p.get_arg()); if (NULL == (_reason = TSHttpHdrReasonLookup((TSHttpStatus)_status.get_int_value()))) { - TSError("header_rewrite: unknown status %d", _status.get_int_value()); + TSLogError("unknown status %d", _status.get_int_value()); _reason_len = 0; } else { _reason_len = strlen(_reason); @@ -120,7 +120,7 @@ OperatorSetStatusReason::exec(const Resources& res) const { _reason.append_value(reason, res); if (reason.size() > 0) { - TSDebug(PLUGIN_NAME, "Setting Status Reason to %s", reason.c_str()); + TSLogDebug("Setting Status Reason to %s", reason.c_str()); TSHttpHdrReasonSet(res.bufp, res.hdr_loc, reason.c_str(), reason.size()); } } @@ -153,17 +153,17 @@ OperatorAddHeader::exec(const Resources& res) const // Never set an empty header (I don't think that ever makes sense?) if (value.empty()) { - TSDebug(PLUGIN_NAME, "Would set header %s to an empty value, skipping", _header.c_str()); + TSLogDebug("Would set header %s to an empty value, skipping", _header.c_str()); return; } if (res.bufp && res.hdr_loc) { - TSDebug(PLUGIN_NAME, "OperatorAddHeader::exec() invoked on header %s: %s", _header.c_str(), value.c_str()); + TSLogDebug("OperatorAddHeader::exec() invoked on header %s: %s", _header.c_str(), value.c_str()); TSMLoc field_loc; if (TS_SUCCESS == TSMimeHdrFieldCreateNamed(res.bufp, res.hdr_loc, _header.c_str(), _header.size(), &field_loc)) { if (TS_SUCCESS == TSMimeHdrFieldValueStringInsert(res.bufp, res.hdr_loc, field_loc, -1, value.c_str(), value.size())) { - TSDebug(PLUGIN_NAME, " adding header %s", _header.c_str()); + TSLogDebug(" adding header %s", _header.c_str()); //INKHttpHdrPrint(res.bufp, res.hdr_loc, reqBuff); TSMimeHdrFieldAppend(res.bufp, res.hdr_loc, field_loc); } @@ -198,35 +198,35 @@ OperatorSetDestination::exec(const Resources& res) const case URL_QUAL_HOST: _value.append_value(value, res); if (value.empty()) { - TSDebug(PLUGIN_NAME, "Would set destination HOST to an empty value, skipping"); + TSLogDebug("Would set destination HOST to an empty value, skipping"); } else { const_cast<Resources&>(res).changed_url = true; TSUrlHostSet(res._rri->requestBufp, res._rri->requestUrl, value.c_str(), value.size()); - TSDebug(PLUGIN_NAME, "OperatorSetHost::exec() invoked with HOST: %s", value.c_str()); + TSLogDebug("OperatorSetHost::exec() invoked with HOST: %s", value.c_str()); } break; case URL_QUAL_PATH: _value.append_value(value, res); if (value.empty()) { - TSDebug(PLUGIN_NAME, "Would set destination PATH to an empty value, skipping"); + TSLogDebug("Would set destination PATH to an empty value, skipping"); } else { const_cast<Resources&>(res).changed_url = true; TSUrlPathSet(res._rri->requestBufp, res._rri->requestUrl, value.c_str(), value.size()); - TSDebug(PLUGIN_NAME, "OperatorSetHost::exec() invoked with PATH: %s", value.c_str()); + TSLogDebug("OperatorSetHost::exec() invoked with PATH: %s", value.c_str()); } break; case URL_QUAL_QUERY: _value.append_value(value, res); if (value.empty()) { - TSDebug(PLUGIN_NAME, "Would set destination QUERY to an empty value, skipping"); + TSLogDebug("Would set destination QUERY to an empty value, skipping"); } else { //1.6.4--Support for preserving QSA in case of set-destination if (get_oper_modifiers() & OPER_QSA) { int query_len = 0; const char* query = TSUrlHttpQueryGet(res._rri->requestBufp, res._rri->requestUrl, &query_len); - TSDebug(PLUGIN_NAME, "QSA mode, append original query string: %.*s", query_len, query); + TSLogDebug("QSA mode, append original query string: %.*s", query_len, query); //std::string connector = (value.find("?") == std::string::npos)? "?" : "&"; value.append("&"); value.append(query, query_len); @@ -234,17 +234,17 @@ OperatorSetDestination::exec(const Resources& res) const const_cast<Resources&>(res).changed_url = true; TSUrlHttpQuerySet(res._rri->requestBufp, res._rri->requestUrl, value.c_str(), value.size()); - TSDebug(PLUGIN_NAME, "OperatorSetHost::exec() invoked with QUERY: %s", value.c_str()); + TSLogDebug("OperatorSetHost::exec() invoked with QUERY: %s", value.c_str()); } break; case URL_QUAL_PORT: if (_value.get_int_value() <= 0) { - TSDebug(PLUGIN_NAME, "Would set destination PORT to an invalid range, skipping"); + TSLogDebug("Would set destination PORT to an invalid range, skipping"); } else { const_cast<Resources&>(res).changed_url = true; TSUrlPortSet(res._rri->requestBufp, res._rri->requestUrl, _value.get_int_value()); - TSDebug(PLUGIN_NAME, "OperatorSetHost::exec() invoked with PORT: %d", _value.get_int_value()); + TSLogDebug("OperatorSetHost::exec() invoked with PORT: %d", _value.get_int_value()); } break; case URL_QUAL_URL: @@ -270,7 +270,7 @@ OperatorSetRedirect::initialize(Parser& p) { if ((_status.get_int_value() != (int)TS_HTTP_STATUS_MOVED_PERMANENTLY) && (_status.get_int_value() != (int)TS_HTTP_STATUS_MOVED_TEMPORARILY)) { - TSError("header_rewrite: unsupported redirect status %d", _status.get_int_value()); + TSLogError("Unsupported redirect status %d", _status.get_int_value()); } require_resources(RSRC_SERVER_RESPONSE_HEADERS); @@ -296,7 +296,7 @@ OperatorSetRedirect::exec(const Resources& res) const int path_len = 0; const char *path = TSUrlPathGet(res._rri->requestBufp, res._rri->requestUrl, &path_len); if (path_len > 0) { - TSDebug(PLUGIN_NAME, "Find %%{PATH} in redirect url, replace it with: %.*s", path_len, path); + TSLogDebug("Find %%{PATH} in redirect url, replace it with: %.*s", path_len, path); value.insert(pos_path, path, path_len); } } @@ -305,7 +305,7 @@ OperatorSetRedirect::exec(const Resources& res) const int query_len = 0; const char *query = TSUrlHttpQueryGet(res._rri->requestBufp, res._rri->requestUrl, &query_len); if ((get_oper_modifiers() & OPER_QSA) && (query_len > 0)) { - TSDebug(PLUGIN_NAME, "QSA mode, append original query string: %.*s", query_len, query); + TSLogDebug("QSA mode, append original query string: %.*s", query_len, query); std::string connector = (value.find("?") == std::string::npos)? "?" : "&"; value.append(connector); value.append(query, query_len); @@ -316,7 +316,7 @@ OperatorSetRedirect::exec(const Resources& res) const const char *start = value.c_str(); const char *end = value.size() + start; TSUrlParse(res._rri->requestBufp, res._rri->requestUrl, &start, end); - TSDebug(PLUGIN_NAME, "OperatorSetRedirect::exec() invoked with destination=%s and status code=%d", + TSLogDebug("OperatorSetRedirect::exec() invoked with destination=%s and status code=%d", value.c_str(), _status.get_int_value()); } @@ -341,7 +341,7 @@ OperatorSetTimeoutOut::initialize(Parser& p) { _type = TO_OUT_DNS; } else { _type = TO_OUT_UNDEFINED; - TSError("header_rewrite: unsupported timeout qualifier: %s", p.get_arg().c_str()); + TSLogError("unsupported timeout qualifier: %s", p.get_arg().c_str()); } _timeout.set_value(p.get_value()); @@ -353,26 +353,26 @@ OperatorSetTimeoutOut::exec(const Resources& res) const { switch (_type) { case TO_OUT_ACTIVE: - TSDebug(PLUGIN_NAME, "OperatorSetTimeoutOut::exec(active, %d)", _timeout.get_int_value()); + TSLogDebug("OperatorSetTimeoutOut::exec(active, %d)", _timeout.get_int_value()); TSHttpTxnActiveTimeoutSet(res.txnp, _timeout.get_int_value()); break; case TO_OUT_INACTIVE: - TSDebug(PLUGIN_NAME, "OperatorSetTimeoutOut::exec(inactive, %d)", _timeout.get_int_value()); + TSLogDebug("OperatorSetTimeoutOut::exec(inactive, %d)", _timeout.get_int_value()); TSHttpTxnNoActivityTimeoutSet(res.txnp, _timeout.get_int_value()); break; case TO_OUT_CONNECT: - TSDebug(PLUGIN_NAME, "OperatorSetTimeoutOut::exec(connect, %d)", _timeout.get_int_value()); + TSLogDebug("OperatorSetTimeoutOut::exec(connect, %d)", _timeout.get_int_value()); TSHttpTxnConnectTimeoutSet(res.txnp, _timeout.get_int_value()); break; case TO_OUT_DNS: - TSDebug(PLUGIN_NAME, "OperatorSetTimeoutOut::exec(dns, %d)", _timeout.get_int_value()); + TSLogDebug("OperatorSetTimeoutOut::exec(dns, %d)", _timeout.get_int_value()); TSHttpTxnDNSTimeoutSet(res.txnp, _timeout.get_int_value()); break; default: - TSError("header_rewrite: unsupported timeout"); + TSLogError("unsupported timeout"); break; } } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/operators.h ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/operators.h b/plugins/header_rewrite/operators.h index f43858f..b54732e 100644 --- a/plugins/header_rewrite/operators.h +++ b/plugins/header_rewrite/operators.h @@ -39,7 +39,7 @@ public: OperatorRMHeader() : _header("") { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for OperatorRMHeader"); + TSLogDebug("Calling CTOR for OperatorRMHeader"); } void initialize(Parser& p); @@ -59,7 +59,7 @@ public: OperatorSetStatus() : _reason(NULL), _reason_len(0) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for OperatorSetStatus"); + TSLogDebug("Calling CTOR for OperatorSetStatus"); } void initialize(Parser& p); @@ -81,7 +81,7 @@ class OperatorSetStatusReason : public Operator public: OperatorSetStatusReason() { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for OperatorSetStatusReason"); + TSLogDebug("Calling CTOR for OperatorSetStatusReason"); } void initialize(Parser& p); @@ -102,7 +102,7 @@ public: OperatorAddHeader() : _header("") { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for OperatorAddHeader"); + TSLogDebug("Calling CTOR for OperatorAddHeader"); } void initialize(Parser& p); @@ -123,7 +123,7 @@ public: OperatorSetDestination() : _url_qual(URL_QUAL_NONE) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for OperatorSetDestination"); + TSLogDebug("Calling CTOR for OperatorSetDestination"); } void initialize(Parser& p); @@ -143,7 +143,7 @@ class OperatorSetRedirect : public Operator public: OperatorSetRedirect() { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for OperatorSetRedirect"); + TSLogDebug("Calling CTOR for OperatorSetRedirect"); } void initialize(Parser& p); @@ -163,7 +163,7 @@ class OperatorNoOp : public Operator public: OperatorNoOp() { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for OperatorNoOp"); + TSLogDebug("Calling CTOR for OperatorNoOp"); } protected: @@ -180,7 +180,7 @@ public: OperatorSetTimeoutOut() : _type(TO_OUT_UNDEFINED) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for OperatorSetTimeoutOut"); + TSLogDebug("Calling CTOR for OperatorSetTimeoutOut"); } void initialize(Parser& p); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/parser.cc ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/parser.cc b/plugins/header_rewrite/parser.cc index f354422..81db2a2 100644 --- a/plugins/header_rewrite/parser.cc +++ b/plugins/header_rewrite/parser.cc @@ -54,7 +54,7 @@ Parser::preprocess(std::vector<std::string>& tokens) else _arg = ""; } else { - TSError("header_rewrite: conditions must be embraced in %%{}"); + TSLogError("Conditions must be embraced in %%{}"); return; } } else { @@ -87,7 +87,7 @@ Parser::preprocess(std::vector<std::string>& tokens) } } else { // Syntax error - TSError("header_rewrite: mods have to be embraced in []"); + TSLogError("mods have to be embraced in []"); return; } } @@ -98,7 +98,7 @@ Parser::preprocess(std::vector<std::string>& tokens) Parser::Parser(const std::string& line) : _cond(false), _empty(false) { - TSDebug("header_rewrite_dbg", "Calling CTOR for Parser"); + TSLogDebug("Calling CTOR for Parser"); if (line[0] == '#') { _empty = true; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/resources.cc ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/resources.cc b/plugins/header_rewrite/resources.cc index c33dfbf..41b1498 100644 --- a/plugins/header_rewrite/resources.cc +++ b/plugins/header_rewrite/resources.cc @@ -27,13 +27,13 @@ void Resources::gather(const ResourceIDs ids, TSHttpHookID hook) { - TSDebug(PLUGIN_NAME, "Building resource structure for hook (%d)", hook); + TSLogDebug("Building resource structure for hook (%d)", hook); // If we need the client request headers, make sure it's also available in the client vars. if (ids & RSRC_CLIENT_REQUEST_HEADERS) { - TSDebug(PLUGIN_NAME, "\tAdding TXN client request header buffers"); + TSLogDebug("\tAdding TXN client request header buffers"); if (TSHttpTxnClientReqGet(txnp, &client_bufp, &client_hdr_loc) != TS_SUCCESS) { - TSDebug(PLUGIN_NAME, "could not gather bufp/hdr_loc for request"); + TSLogDebug("could not gather bufp/hdr_loc for request"); return; } } @@ -42,14 +42,14 @@ Resources::gather(const ResourceIDs ids, TSHttpHookID hook) case TS_HTTP_READ_RESPONSE_HDR_HOOK: // Read response headers from server if (ids & RSRC_SERVER_RESPONSE_HEADERS) { - TSDebug(PLUGIN_NAME, "\tAdding TXN server response header buffers"); + TSLogDebug("\tAdding TXN server response header buffers"); if (TSHttpTxnServerRespGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) { - TSDebug(PLUGIN_NAME, "could not gather bufp/hdr_loc for response"); + TSLogDebug("Could not gather bufp/hdr_loc for response"); return; } } if (ids & RSRC_RESPONSE_STATUS) { - TSDebug(PLUGIN_NAME, "\tAdding TXN server response status resource"); + TSLogDebug("\tAdding TXN server response status resource"); resp_status = TSHttpHdrStatusGet(bufp, hdr_loc); } break; @@ -57,9 +57,9 @@ Resources::gather(const ResourceIDs ids, TSHttpHookID hook) case TS_HTTP_SEND_REQUEST_HDR_HOOK: // Read request headers to server if (ids & RSRC_SERVER_REQUEST_HEADERS) { - TSDebug(PLUGIN_NAME, "\tAdding TXN server request header buffers"); + TSLogDebug("\tAdding TXN server request header buffers"); if (!TSHttpTxnServerReqGet(txnp, &bufp, &hdr_loc)) { - TSDebug(PLUGIN_NAME, "could not gather bufp/hdr_loc for request"); + TSLogDebug("Could not gather bufp/hdr_loc for request"); return; } } @@ -77,13 +77,13 @@ Resources::gather(const ResourceIDs ids, TSHttpHookID hook) case TS_HTTP_SEND_RESPONSE_HDR_HOOK: // Send response headers to client if (ids & RSRC_CLIENT_RESPONSE_HEADERS) { - TSDebug(PLUGIN_NAME, "\tAdding TXN client response header buffers"); + TSLogDebug("\tAdding TXN client response header buffers"); if (TSHttpTxnClientRespGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) { - TSDebug(PLUGIN_NAME, "could not gather bufp/hdr_loc for request"); + TSLogDebug("Could not gather bufp/hdr_loc for request"); return; } if (ids & RSRC_RESPONSE_STATUS) { - TSDebug(PLUGIN_NAME, "\tAdding TXN client esponse status resource"); + TSLogDebug("\tAdding TXN client esponse status resource"); resp_status = TSHttpHdrStatusGet(bufp, hdr_loc); } } @@ -92,7 +92,7 @@ Resources::gather(const ResourceIDs ids, TSHttpHookID hook) case TS_REMAP_PSEUDO_HOOK: // Pseudo-hook for a remap instance if (client_bufp && client_hdr_loc) { - TSDebug(PLUGIN_NAME, "\tAdding TXN client request header buffers for remap instance"); + TSLogDebug("\tAdding TXN client request header buffers for remap instance"); bufp = client_bufp; hdr_loc = client_hdr_loc; } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/resources.h ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/resources.h b/plugins/header_rewrite/resources.h index d2ce9f5..815a3e1 100644 --- a/plugins/header_rewrite/resources.h +++ b/plugins/header_rewrite/resources.h @@ -51,7 +51,7 @@ public: : txnp(txnptr), contp(contptr), bufp(NULL), hdr_loc(NULL), client_bufp(NULL), client_hdr_loc(NULL), resp_status(TS_HTTP_STATUS_NONE), _rri(NULL), changed_url(false), _ready(false) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for Resources (InkAPI)"); + TSLogDebug("Calling CTOR for Resources (InkAPI)"); } Resources(TSHttpTxn txnptr, TSRemapRequestInfo *rri) : @@ -59,8 +59,8 @@ public: bufp(NULL), hdr_loc(NULL), client_bufp(NULL), client_hdr_loc(NULL), resp_status(TS_HTTP_STATUS_NONE), _rri(rri), _ready(false) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for Resources (RemapAPI)"); - TSDebug(PLUGIN_NAME, "rri: %p", _rri); + TSLogDebug("Calling CTOR for Resources (RemapAPI)"); + TSLogDebug("rri: %p", _rri); } ~Resources() { destroy(); } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/ruleset.cc ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/ruleset.cc b/plugins/header_rewrite/ruleset.cc index 9b2d688..11204c7 100644 --- a/plugins/header_rewrite/ruleset.cc +++ b/plugins/header_rewrite/ruleset.cc @@ -45,10 +45,10 @@ RuleSet::add_condition(Parser& p) { Condition* c = condition_factory(p.get_op()); if (NULL != c) { - TSDebug(PLUGIN_NAME, "Adding condition: %%{%s} with arg: %s\n", p.get_op().c_str(), p.get_arg().c_str()); + TSLogDebug("Adding condition: %%{%s} with arg: %s\n", p.get_op().c_str(), p.get_arg().c_str()); c->initialize(p); if (!c->set_hook(_hook)) { - TSError("header_rewrite: can't use this condition in this hook"); + TSLogError("Cannot use this condition in this hook"); return; } if (NULL == _cond) { @@ -70,10 +70,10 @@ RuleSet::add_operator(Parser& p) { if (NULL != o) { // TODO: This should be extended to show both the "argument" and the "value" (if both are used) - TSDebug(PLUGIN_NAME, "Adding operator: %s(%s)\n", p.get_op().c_str(), p.get_arg().c_str()); + TSLogDebug("Adding operator: %s(%s)\n", p.get_op().c_str(), p.get_arg().c_str()); o->initialize(p); if (!o->set_hook(_hook)) { - TSError("header_rewrite: can't use this operator in this hook"); + TSLogError("Cannot use this operator in this hook"); return; } if (NULL == _oper) { http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/statement.h ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/statement.h b/plugins/header_rewrite/statement.h index 15fdf11..7492137 100644 --- a/plugins/header_rewrite/statement.h +++ b/plugins/header_rewrite/statement.h @@ -51,11 +51,11 @@ class Statement Statement() : _next(NULL), _pdata(NULL), _rsrc(RSRC_NONE), _initialized(false), _hook(TS_HTTP_READ_RESPONSE_HDR_HOOK) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for Statement"); + TSLogDebug("Calling CTOR for Statement"); } virtual ~Statement() { - TSDebug(PLUGIN_NAME_DBG, "Calling DTOR for Statement"); + TSLogDebug("Calling DTOR for Statement"); free_pdata(); } http://git-wip-us.apache.org/repos/asf/trafficserver/blob/9800aa92/plugins/header_rewrite/value.h ---------------------------------------------------------------------- diff --git a/plugins/header_rewrite/value.h b/plugins/header_rewrite/value.h index 0c318fc..55fa537 100644 --- a/plugins/header_rewrite/value.h +++ b/plugins/header_rewrite/value.h @@ -44,7 +44,7 @@ public: Value() : _value(""), _int_value(-1), _cond_val(NULL) { - TSDebug(PLUGIN_NAME_DBG, "Calling CTOR for Value"); + TSLogDebug("Calling CTOR for Value"); }; void
