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

Erick Erickson commented on SOLR-2191:
--------------------------------------


What does "remove logOnce" mean in this case? Remove the method, sure. But note 
that the log(...) methods at least set the 'logged' value. Should that variable 
be removed too in your opinion?

I think I favor just removing logOnce, and expanding the use of 'logged' in the 
log(...) methods to return if it's already set at the top. I really dislike the 
idea of trying to keep track of where an exception is *really* reported, there 
are just too many code paths.....

If people want to let the upper layers handle reporting, they can wrap the 
exception in a SolrException and re-throw, optionally logging the error at that 
point. If they don't wrap the exception and *do* log it, it may be re-logged 
later but that's a personal problem that should be dealt with on a case-by-case 
basis.

Should anything be done with 3.6, i.e. deprecate whatever we decide so we can 
nuke it in 5.x?

I may well commit this and open up another JIRA for further work. SOLR-3022 
deals with this too. I'd like to consolidate all this by this weekend, any 
others out there?
                
> 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
>            Assignee: Erick Erickson
>             Fix For: 3.6, 4.0
>
>         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.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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