You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Oliver Schrenk <ol...@gmail.com> on 2015/07/23 18:20:44 UTC

Use slf4j consistently

Hi,


I wanted to move to log4j2 as the logging implementation for Solr (1) but ran into some issues when I switched out the appropriate jars.  Unfortunately there are a few classes that directly rely on log4j to be on the classpath instead and don't use the slf4j logging facade. So I wanted to remove these references


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

use log4j instead of slf4j to get logger


I had a stab at it at

https://github.com/oschrenk/lucene-solr/commit/025b4802caf0360c63a3554af82e9ed4c94ff5a3#diff-7d822e8ff8ff21d88437652bbc894739R28


Cheers,
Oliver



(1) http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201507.mbox/%3C0F4200AE-3D7E-40FE-B0C2-040E89BBA58B%40elmar.nl%3E <http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201507.mbox/%3C0F4200AE-3D7E-40FE-B0C2-040E89BBA58B@elmar.nl%3E>

Re: Use slf4j consistently

Posted by Mark Miller <ma...@gmail.com>.
Great Oliver - could you file a JIRA issue?

- Mark

On Thu, Jul 23, 2015 at 12:20 PM Oliver Schrenk <ol...@gmail.com>
wrote:

> Hi,
>
>
> I wanted to move to log4j2 as the logging implementation for Solr (1) but
> ran into some issues when I switched out the appropriate jars.
> Unfortunately there are a few classes that directly rely on log4j to be on
> the classpath instead and don't use the slf4j logging facade. So I wanted
> to remove these references
>
>
> 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
>
> use log4j instead of slf4j to get logger
>
>
> I had a stab at it at
>
>
> https://github.com/oschrenk/lucene-solr/commit/025b4802caf0360c63a3554af82e9ed4c94ff5a3#diff-7d822e8ff8ff21d88437652bbc894739R28
>
>
> Cheers,
> Oliver
>
>
>
> (1)
> http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201507.mbox/%3C0F4200AE-3D7E-40FE-B0C2-040E89BBA58B%40elmar.nl%3E
> <http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201507.mbox/%3C0F4200AE-3D7E-40FE-B0C2-040E89BBA58B@elmar.nl%3E>
>
-- 
- Mark
about.me/markrmiller