[ 
https://issues.apache.org/jira/browse/TS-2106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13741453#comment-13741453
 ] 

Phil Sorber commented on TS-2106:
---------------------------------

[~zwoop] and I reviewed this patch. We both agree the concept is good. We'd 
like the implementation to got a little further. Here are our notes in no 
particular order:

* use ""'s instead of <>'s for ts includes
* remove extra newline introduced into ts.h.in
* Use Diags.h instead of TSDebug and TSError. TSDebug is for tracing not really 
a log level. Diags.(h|cc) has log levels already defined. We probably need one 
new C API function defined that the macro's work with. This should deprecate 
TSError.
* no exit(-1). Find something in Diags that is more appropriate than just 
killing ATS.
                
> 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ć
>            Assignee: Igor Galić
>             Fix For: 3.5.2
>
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to