Solr
  1. Solr
  2. SOLR-3426

Verbose error message when Log4j is enabled

    Details

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

      Description

      The code quoted here from CoreContainer.java ends up looking for a class named Log4j instead of Log4jWatcher. Neither name exists in the tree.

      // Now load the framework
      if(fname!=null) {
      if("JUL".equalsIgnoreCase(fname))

      { logging = new JulWatcher(slf4jImpl); }

      // else if( "Log4j".equals(fname) )

      { // logging = new Log4jWatcher(slf4jImpl); // }

      else {
      try

      { logging = loader.newInstance(fname, LogWatcher.class); }

      catch (Throwable e)

      { log.warn("Unable to load LogWatcher", e); }

      }

      1. solr-3426.patch
        0.8 kB
        Benson Margulies

        Activity

        Hide
        Ryan McKinley added a comment -

        right – if you are using Log4j, the LogWatcher stuff will not work.

        In the current behavior, you should get a warning in the logs and when you try the logging UI it will give a warning that it did not load.

        See: SOLR-3399 and SOLR-3358 that look at ways to capture log4j events.

        Show
        Ryan McKinley added a comment - right – if you are using Log4j, the LogWatcher stuff will not work. In the current behavior, you should get a warning in the logs and when you try the logging UI it will give a warning that it did not load. See: SOLR-3399 and SOLR-3358 that look at ways to capture log4j events.
        Hide
        Benson Margulies added a comment -

        here is a temporary fix that removes all the noisy backtracing from the log.

        Show
        Benson Margulies added a comment - here is a temporary fix that removes all the noisy backtracing from the log.
        Hide
        Benson Margulies added a comment -

        To be clear, the 'warning' is a screenful of backtraces, and that's pretty scary and annoying.

        Show
        Benson Margulies added a comment - To be clear, the 'warning' is a screenful of backtraces, and that's pretty scary and annoying.
        Hide
        Ryan McKinley added a comment -

        removed the error trace in revision: 1332752

        Show
        Ryan McKinley added a comment - removed the error trace in revision: 1332752

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development