You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by zwoop <gi...@git.apache.org> on 2016/09/02 01:35:10 UTC

[GitHub] trafficserver pull request #958: TS-4449 Better errors and debug output

GitHub user zwoop opened a pull request:

    https://github.com/apache/trafficserver/pull/958

    TS-4449 Better errors and debug output

    This does a few things:
    
       1. Better error reports when parsing a config file
       2. Better diagnostics when debugging expressions
    
    I also added an example to the docs, for a common use case that
    turns out to be non-obvious.
    
    (cherry picked from commit b905a52a4a7a0a3d05966bc1a74ee6407cf94c39)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zwoop/trafficserver TS-4449-6.2.x

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/958.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #958
    
----
commit 2345b0460bdba992fdfa193c2b35609c58cd4ed8
Author: Leif Hedstrom <zw...@apache.org>
Date:   2016-05-17T19:12:19Z

    TS-4449 Better errors and debug output
    
    This does a few things:
    
       1. Better error reports when parsing a config file
       2. Better diagnostics when debugging expressions
    
    I also added an example to the docs, for a common use case that
    turns out to be non-obvious.
    
    (cherry picked from commit b905a52a4a7a0a3d05966bc1a74ee6407cf94c39)

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request #958: TS-4449 Better errors and debug output

Posted by jpeach <gi...@git.apache.org>.
Github user jpeach commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/958#discussion_r77410889
  
    --- Diff: plugins/header_rewrite/ruleset.cc ---
    @@ -73,7 +74,8 @@ RuleSet::add_operator(Parser &p)
         TSDebug(PLUGIN_NAME, "   Adding operator: %s(%s)\n", p.get_op().c_str(), p.get_arg().c_str());
         o->initialize(p);
         if (!o->set_hook(_hook)) {
    -      TSError("[%s] can't use this operator in this hook", PLUGIN_NAME);
    +      TSError("[%s] in %s: can't use this operator in hook=%d:  %s(%s)", PLUGIN_NAME, filename, _hook, p.get_op().c_str(),
    --- End diff --
    
    ``TSHttpHookNameLookup`` again.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #958: TS-4449 Better errors and debug output

Posted by jpeach <gi...@git.apache.org>.
Github user jpeach commented on the issue:

    https://github.com/apache/trafficserver/pull/958
  
    @zwoop Please add the version to the ``Backport`` field in the corresponding JIRA.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request #958: TS-4449 Better errors and debug output

Posted by zwoop <gi...@git.apache.org>.
Github user zwoop closed the pull request at:

    https://github.com/apache/trafficserver/pull/958


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver pull request #958: TS-4449 Better errors and debug output

Posted by jpeach <gi...@git.apache.org>.
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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #958: TS-4449 Better errors and debug output

Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on the issue:

    https://github.com/apache/trafficserver/pull/958
  
    This is a cherry-pick to to get some of the better fixes, as a back port to 6.2.x. The hook lookups were changed later (I think) on master.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #958: TS-4449 Better errors and debug output

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/958
  
    Linux build *successful*! See https://ci.trafficserver.apache.org/job/Github-Linux/570/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #958: TS-4449 Better errors and debug output

Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:

    https://github.com/apache/trafficserver/pull/958
  
    FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/674/ for details.
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] trafficserver issue #958: TS-4449 Better errors and debug output

Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on the issue:

    https://github.com/apache/trafficserver/pull/958
  
    Meh, lets not do this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---