Hoss Man created SOLR-4833:
------------------------------
Summary: 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
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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]