You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "David Smiley (Jira)" <ji...@apache.org> on 2020/11/05 16:50:00 UTC
[jira] [Commented] (SOLR-8330) Restrict logger visibility
throughout the codebase to private so that only the file that declares it
can use it
[ https://issues.apache.org/jira/browse/SOLR-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17226823#comment-17226823 ]
David Smiley commented on SOLR-8330:
------------------------------------
I'm looking at logs to debug a problem, and the logger name I see in some logs is {{org.apache.solr.handler.RequestHandlerBase}}. Wouldn't it be superior to see SearchHandler or whatever the subclass might be? This is an abstract base class, yet it declares a static logger. I'm surprised to learn that this was intentional, decided in this issue by [~anshum]. I would like to reverse this decision. Thoughts? I'll file a new issue of course.
CC [~erickerickson] as well; who cares about logging.
> Restrict logger visibility throughout the codebase to private so that only the file that declares it can use it
> ---------------------------------------------------------------------------------------------------------------
>
> Key: SOLR-8330
> URL: https://issues.apache.org/jira/browse/SOLR-8330
> Project: Solr
> Issue Type: Sub-task
> Affects Versions: 6.0
> Reporter: Jason Gerlowski
> Assignee: Anshum Gupta
> Priority: Major
> Labels: logging
> Fix For: 5.4, 6.0
>
> Attachments: SOLR-8330-combined.patch, SOLR-8330-detector.patch, SOLR-8330-detector.patch, SOLR-8330.patch, SOLR-8330.patch, SOLR-8330.patch, SOLR-8330.patch, SOLR-8330.patch, SOLR-8330.patch, SOLR-8330.patch
>
>
> As Mike Drob pointed out in Solr-8324, many loggers in Solr are unintentionally shared between classes. Many instances of this are caused by overzealous copy-paste. This can make debugging tougher, as messages appear to come from an incorrect location.
> As discussed in the comments on SOLR-8324, there also might be legitimate reasons for sharing loggers between classes. Where any ambiguity exists, these instances shouldn't be touched.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org