Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-7825

Forbid usage of log4j and JUL logger in Solr

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.2.1
    • Fix Version/s: 5.3, 6.0
    • Component/s: Server
    • Labels:
      None

      Description

      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

        Attachments

        1. slf4j.patch
          4 kB
          Oliver Schrenk
        2. SOLR-7825.patch
          23 kB
          Shalin Shekhar Mangar
        3. SOLR-7825.patch
          23 kB
          Shalin Shekhar Mangar

          Activity

            People

            • Assignee:
              shalinmangar Shalin Shekhar Mangar
              Reporter:
              oschrenk Oliver Schrenk
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: