Solr
  1. Solr
  2. SOLR-3356

Logging UI (and LogLevelHandler) should support Log4j

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0-ALPHA
    • Component/s: None
    • Labels:
      None

      Description

      The Logging UI and LogLevelHandler can work using Log4j rather then just JUL

        Issue Links

          Activity

          Hide
          Ryan McKinley added a comment -

          this uses reflection to make the Log4j setLevel call

          It also adds info to the header that says which framework is enabled:

          <str name="framework">java.util.logging</str>
          <str name="slfj4">org.slf4j.impl.JDK14LoggerFactory</str>
          
          <str name="framework">log4j</str>
          <str name="slfj4">org.slf4j.impl.Log4jLoggerFactory</str>
          
          Show
          Ryan McKinley added a comment - this uses reflection to make the Log4j setLevel call It also adds info to the header that says which framework is enabled: <str name= "framework" > java.util.logging </str> <str name= "slfj4" > org.slf4j.impl.JDK14LoggerFactory </str> <str name= "framework" > log4j </str> <str name= "slfj4" > org.slf4j.impl.Log4jLoggerFactory </str>
          Hide
          Ryan McKinley added a comment -

          Added in r1325828

          This uses StaticLoggerBinder.getSingleton().getLoggerFactoryClassStr() to detect the logging framework, and will do the right thing for JUL or Log4j

          otherwise it will return an error

          Show
          Ryan McKinley added a comment - Added in r1325828 This uses StaticLoggerBinder.getSingleton().getLoggerFactoryClassStr() to detect the logging framework, and will do the right thing for JUL or Log4j otherwise it will return an error
          Hide
          Steve Rowe added a comment -

          Ryan,

          Under the maven build, all solr modules have log4j-over-slf4j as a test scope dependency, but the solr-core module doesn't have it as a compile scope dependency. As a result of this missing dependency, compilation failures ensue.

          Shouldn't the Maven solr-core module have a compile scope dependency on log4j-over-slf4j?

          Show
          Steve Rowe added a comment - Ryan, Under the maven build, all solr modules have log4j-over-slf4j as a test scope dependency, but the solr-core module doesn't have it as a compile scope dependency. As a result of this missing dependency, compilation failures ensue . Shouldn't the Maven solr-core module have a compile scope dependency on log4j-over-slf4j ?
          Hide
          Steve Rowe added a comment -

          I got the wrong jar: slf4j-jdk14 contains package org.slf4j.impl, not log4j-over-slf4j; this is the one I think the Maven solr-core module should have a compile scope dependency on.

          Show
          Steve Rowe added a comment - I got the wrong jar: slf4j-jdk14 contains package org.slf4j.impl , not log4j-over-slf4j ; this is the one I think the Maven solr-core module should have a compile scope dependency on.
          Hide
          Stefan Matheis (steffkes) added a comment -

          I've added a small header on the logging-tab which shows the newly added informations, committed in r1326355

          Show
          Stefan Matheis (steffkes) added a comment - I've added a small header on the logging-tab which shows the newly added informations, committed in r1326355

            People

            • Assignee:
              Ryan McKinley
              Reporter:
              Ryan McKinley
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development