Solr
  1. Solr
  2. SOLR-2615

Have LogUpdateProcessor log each command (add, delete, ...) at debug/FINE level

    Details

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

      Description

      It would be great if the LogUpdateProcessor logged each command (add, delete, ...) at debug ("Fine") level. Presently it only logs a summary of 8 commands and it does so at the very end.

      The attached patch implements this.

      • I moved the LogUpdateProcessor ahead of RunUpdateProcessor so that the debug level log happens before Solr does anything with it. It should not affect the ordering of the existing summary log which happens at finish().
      • I changed UpdateRequestProcessor's static log variable to be an instance variable that uses the current class name. I think this makes much more sense since I want to be able to alter logging levels for a specific processor without doing it for all of them. This change did require me to tweak the factory's detection of the log level which avoids creating the LogUpdateProcessor.
      • There was an NPE bug in AddUpdateCommand.getPrintableId() in the event there is no schema unique field. I fixed that.

      You may notice I use SLF4J's nifty log.debug("message blah {} blah", var) syntax, which is both performant and concise as there's no point in guarding the debug message with an isDebugEnabled() since debug() will internally check this any way and there is no string concatenation if debug isn't enabled.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Yonik Seeley
            Reporter:
            David Smiley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development