[
https://issues.apache.org/jira/browse/TS-2106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14582577#comment-14582577
]
ASF GitHub Bot commented on TS-2106:
------------------------------------
GitHub user ngjunjie1991 opened a pull request:
https://github.com/apache/trafficserver/pull/220
TS-2106 Added plugin names to all TSError messages. Removed \n.
Tested: RHEL-6.5
Author: Jun Jie Ng <[email protected]>
Normalized all TSError messages to state the plugin from which it was made
from. Also removed the newline character /n at the end of TSError messages that
had them, and rephrased some TSError messages that had the word "Error" when
appropriate, as mentioned in the ticket description.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ngjunjie1991/trafficserver master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/220.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 #220
----
commit 5829a71d2fcb920410ef348df65396af2d329a80
Author: Jun Jie Ng <[email protected]>
Date: 2015-06-11T21:37:32Z
TS-2106 Added plugin names to all TSError messages. Removed \n.
Tested: RHEL-6.5
Author: Jun Jie Ng <[email protected]>
Normalized all TSError messages to state the plugin from which it was made
from. Also removed the newline character /n at the end of TSError messages that
had them, and rephrased some TSError messages that had the word "Error" when
appropriate, as mentioned in the ticket description.
----
> Normalize TSError messages in plugins (and examples)
> ----------------------------------------------------
>
> Key: TS-2106
> URL: https://issues.apache.org/jira/browse/TS-2106
> Project: Traffic Server
> Issue Type: Bug
> Components: Plugins
> Reporter: Igor Galić
> Labels: newbie
> Fix For: sometime
>
>
> right now many of plugins send error messages without prefixing the plugin
> they come from, this bad practice is also continued in our examples.
> many error messages also close with {{\n}}, although this is not necessary.
> We should fix this by "normalizing" the way we send those error messages.
> Our proposal is either:
> {code}
> TSError("%s: cannot parse file %s", PLUGIN_NAME, filename);
> {code}
> or:
> {code}
> TSError("[%s] cannot parse file %s", PLUGIN_NAME, filename);
> {code}
> I have no strong leanings towards either. BUT: We should have one consistent
> format between examples and plugins and newly imported code. The word "error"
> should not be repeated, as it is already in the "severity" ({{TSError()}}.
> There should be *no* {{\n}} at the end of the message.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)