[ https://issues.apache.org/jira/browse/TS-4449?focusedWorklogId=27977&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-27977 ]
ASF GitHub Bot logged work on TS-4449: -------------------------------------- Author: ASF GitHub Bot Created on: 02/Sep/16 20:57 Start Date: 02/Sep/16 20:57 Worklog Time Spent: 10m Work Description: Github user jpeach commented on a diff in the pull request: https://github.com/apache/trafficserver/pull/958#discussion_r77410848 --- Diff: plugins/header_rewrite/ruleset.cc --- @@ -40,15 +40,16 @@ RuleSet::append(RuleSet *rule) } void -RuleSet::add_condition(Parser &p) +RuleSet::add_condition(Parser &p, const char *filename) { 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()); c->initialize(p); if (!c->set_hook(_hook)) { - TSError("[%s] can't use this condition in this hook", PLUGIN_NAME); + TSError("[%s] in %s: can't use this condition in hook=%d: %%{%s} with arg: %s", PLUGIN_NAME, filename, _hook, + p.get_op().c_str(), p.get_arg().c_str()); --- End diff -- Use ``TSHttpHookNameLookup`` to log the hook by name. Issue Time Tracking ------------------- Worklog Id: (was: 27977) Time Spent: 40m (was: 0.5h) > header_rewrite: Improve TSDebug() statements > -------------------------------------------- > > Key: TS-4449 > URL: https://issues.apache.org/jira/browse/TS-4449 > Project: Traffic Server > Issue Type: Improvement > Components: Plugins > Reporter: Leif Hedstrom > Assignee: Leif Hedstrom > Fix For: 7.0.0 > > Time Spent: 40m > Remaining Estimate: 0h > > Right now, it can be difficult at times to understand why header_rewrite > isn't behaving as you'd expect. There are a number of places where we can > improve TSDebug(). > Also, I'm going to do a code cleanup here, to make the code more inline with > our current best practices (e.g. use if () { } consistently). -- This message was sent by Atlassian JIRA (v6.3.4#6332)