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

Yonik Seeley commented on SOLR-2191:
------------------------------------

bq. In code I write, I tend to almost never log exceptions; I let them get to 
the highest possible point to ensure they are logged there once, which is 
usually one place. Beforehand I might catch an exception to do a log.error() to 
provide some context and then rethrow the exception.

Right.  And logging immediately can be problematic since one may not know if 
it's really an error that should be logged since Exceptions can sometimes be 
handled (dismax is one example).

Anyway, certainly a +1 from me for changing the default of alreadyLogged and 
improving the strategy in general.

> Change SolrException cstrs that take Throwable to default to 
> alreadyLogged=false
> --------------------------------------------------------------------------------
>
>                 Key: SOLR-2191
>                 URL: https://issues.apache.org/jira/browse/SOLR-2191
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Mark Miller
>             Fix For: Next
>
>         Attachments: SOLR-2191.patch
>
>
> Because of misuse, many exceptions are now not logged at all - can be painful 
> when doing dev. I think we should flip this setting and work at removing any 
> double logging - losing logging is worse (and it almost looks like we lose 
> more logging than we would get in double logging) - and bad 
> solrexception/logging patterns are proliferating.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to