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

Mike Drob resolved SOLR-4833.
-----------------------------
    Resolution: Duplicate

> All(most all) Logger instances should be made static
> ----------------------------------------------------
>
>                 Key: SOLR-4833
>                 URL: https://issues.apache.org/jira/browse/SOLR-4833
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Hoss Man
>         Attachments: SOLR-4833-Remove-None-static-loggers.patch
>
>
> The majority of Logger usage in Solr is via static variables, but there are a 
> few places where this pattern does not hold true - i think we should fix that 
> and be completley consistent.  if there is any specific cases where a 
> non-static variable really makes a lot of sense, then it should be heavily 
> commented as to why.
> ----
> The SLF4J FAQ has a list of pros and cons for why Logger variables 
> should/shouldn't be static...
> http://slf4j.org/faq.html#declared_static
> ...the majority of the "pros" for non-static usage don't really apply to 
> Solr, while the pros for static usage due.
> Another lucene/solr specific pro in favor of static variables for loggers is 
> the way our test framework looks for memory leaks in tests.  Having a simple 
> test that does not null out a static reference to what seems like a small 
> object is typically fine -- but if that small object has an explicit 
> (non-static) reference to a Logger, all of the state in that Logger is 
> counted as part of the size of that small object leading to confusion.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to