[ 
https://issues.apache.org/jira/browse/SOLR-8330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Gerlowski updated SOLR-8330:
----------------------------------
    Attachment: SOLR-8330-combined.patch

I've made the changes that Uwe suggested a few comments ago.

1.) Interface loggers have been removed.

2.) non-nested classes that required loggers to be non-private were changed to 
internal static classes.

3.) Test classes that used non-private loggers have been massaged to comply 
with the source-pattern check (or in one case, excluded).

As Anshum pointed out in an earlier comment, {{RequestLoggingTest}} still seems 
to fail with this patch.  It's unclear to me how relevant this test still is.

> 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: Trunk
>            Reporter: Jason Gerlowski
>            Assignee: Anshum Gupta
>              Labels: logging
>             Fix For: Trunk
>
>         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
>
>
> 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
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to