[
https://issues.apache.org/jira/browse/SOLR-7825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shalin Shekhar Mangar updated SOLR-7825:
----------------------------------------
Attachment: SOLR-7825.patch
Thanks Oliver.
This patch:
# Fixes almost all places except the classes which are specific to log4j or
java.util.logging.
# Forbids usage of all log4j and java.util.logging classes across the entire
Solr code base so that such mistakes do not occur again.
# The property configurator use inside MapReduceIndexerTool and Utils is
refactored to a single method which is excluded from forbidden-apis check
# I don't know why ConcurrentDeleteAndCreateCollectionTest was trying to set
logging levels directly but it doesn't seem useful and I removed it. [~shaie] -
is this okay?
# The usage inside SolrCLI was only because it changed log levels for ZK and
solrj to reduce noise. On [~thelabdude]'s suggestion, I set the log levels
inside solr/server/scripts/cloud-scripts/log4j.properties instead of code. Also
the default log level for org.apache.zookeeper is changed to WARN instead of
ERROR. This is because if ZK is not running, the ZK client retries a few times
and this activity is logged in WARN. If we set the log level to ERROR then the
zkcli script just hangs for a while (more than a minute).
> Use slf4j consistently
> ----------------------
>
> Key: SOLR-7825
> URL: https://issues.apache.org/jira/browse/SOLR-7825
> Project: Solr
> Issue Type: Improvement
> Components: Server
> Affects Versions: 5.2.1
> Reporter: Oliver Schrenk
> Assignee: Shalin Shekhar Mangar
> Priority: Minor
> Attachments: SOLR-7825.patch, slf4j.patch
>
>
> There are a few classes that directly rely on log4j to be on the classpath
> instead and don't use the slf4j logging facade. This creates problems when
> trying to switch the logging implementation.
> 1. org.apache.solr.core.ZkContainer
> https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/core/ZkContainer.java#L218
> I don't know the impact of this change, but shouldn't this call
> `org.apache.solr.logging.MDCLoggingContext.clear()` ?
> 2. org.apache.solr.handler.component.RangeFacetProcessor and
> org.apache.solr.handler.component.RangeFacetRequest
> should use slf4j instead of log4j
> I had a stab at it at
> https://github.com/oschrenk/lucene-solr/commit/025b4802caf0360c63a3554af82e9ed4c94ff5a3#diff-7d822e8ff8ff21d88437652bbc894739R28
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]