[jira] [Commented] (SOLR-7825) Use slf4j consistently

2015-07-24 Thread Oliver Schrenk (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14640504#comment-14640504
 ] 

Oliver Schrenk commented on SOLR-7825:
--

The logging implementations of dependencies can't be changed. As you mentioned 
though, not all is lost and these calls can be intercepted. I felt though that 
at least core should strive for consistency in its logging usage. There are 
actually not so many usages throughout the project

There are some instances in contrib

{code}
contrib/map-reduce/src/java/org/apache/solr/hadoop/MapReduceIndexerTool.java
contrib/map-reduce/src/java/org/apache/solr/hadoop/SolrRecordWriter.java
contrib/map-reduce/src/java/org/apache/solr/hadoop/Utils.java
{code}

or just used by contrib

{code}
core/src/java/org/apache/solr/util/SolrLogLayout.java
{code}

Then there are that are specific to log4j. Im not sure how they are used.

{code}
core/src/java/org/apache/solr/logging/log4j/EventAppender.java
core/src/java/org/apache/solr/logging/log4j/Log4jInfo.java:22
core/src/java/org/apache/solr/logging/log4j/Log4jWatcher.java
{code}

This is standalone

{code}
core/src/java/org/apache/solr/util/SolrCLI.java
{code}

Usages in test

{code}
core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java
core/src/test/org/apache/solr/handler/admin/LoggingHandlerTest.java
core/src/test/org/apache/solr/handler/RequestLoggingTest.java
{code}


I just thought I start because the one in ZkContainer was actually a nuisance 
to me (because I wasn't aware of {{log4j-over-slf4}}




 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
Priority: Minor
 Attachments: 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-7825) Use slf4j consistently

2015-07-24 Thread Shai Erera (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14640771#comment-14640771
 ] 

Shai Erera commented on SOLR-7825:
--

[~shalinmangar] I think I left it there by mistake, probably when I debugged 
the issue I added this test for, and forgot to remove it :). Thanks!

 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-7825) Use slf4j consistently

2015-07-24 Thread Uwe Schindler (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14640844#comment-14640844
 ] 

Uwe Schindler commented on SOLR-7825:
-

Some comments:
- MapReduceIndexertool still imports the log4j class (leftover), it also 
imports SuppressForbidden but does not use it - cleanup
- In the solr.txt sigatures file i would truncate with {{**}} instead of {{*}}. 
** is like Ant/Maven's fileset includes and spawn several packages. So 
{{org.apache.log4j.**}} would also match possible sub-packages.

 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (SOLR-7825) Use slf4j consistently

2015-07-23 Thread Shawn Heisey (JIRA)

[ 
https://issues.apache.org/jira/browse/SOLR-7825?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14639362#comment-14639362
 ] 

Shawn Heisey commented on SOLR-7825:


We should certainly fix problems like this.

All is not lost even without the fixes, though:  If you're switching logging 
implementations, you should be adding the slf4j jar to intercept log4j calls 
and direct them through slf4j -- log4j-over-slf4j-X.Y.Z.jar -- and removing the 
actual log4j jar.  Some of Solr's dependencies (zookeeper being a prime 
example) use log4j directly.

 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
Priority: Minor

 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: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org