[ 
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.patch

Ok, checking back in.

Attached is my first attempt at this patch.  It applies to trunk as of the time 
of this comment (with a few minutes delta).  It has the following changes:

1.) All loggers now use copy-paste safe "MethodHandles" style declaration.

2.) I deleted loggers in classes where I found they weren't being used at all.  
(Since I was switching many of them from public to private, I found I didn't 
want to add warnings about unused-fields, so I deleted them)

3.) No loggers are shared outside of the Java file in which they were declared. 
 However, some outer class loggers are still used by inner classes.  It seemed 
like this was the consensus we came to on this.

I'm happy to make any changes to (1), (2), or (3) above.  Hopefully I didn't 
misread the consensus here.

One last question- I was unsure of whether this change merited a note in 
CHANGES.txt.  It is mostly a reorganization, but it will change a few log 
messages.  This patch doesn't add a note to CHANGES.txt, but I'm happy to add 
one if it merits one.  I wasn't sure whether all changes make it into that 
file, or just ones that are of particular interest to end users.


> Remove unintentionally shared loggers.
> --------------------------------------
>
>                 Key: SOLR-8330
>                 URL: https://issues.apache.org/jira/browse/SOLR-8330
>             Project: Solr
>          Issue Type: Sub-task
>    Affects Versions: Trunk
>            Reporter: Jason Gerlowski
>              Labels: logging
>             Fix For: Trunk
>
>         Attachments: 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