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?