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

Create separate logger for slow requests

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4, 8.0
    • Component/s: logging
    • Labels:
      None

      Description

      There is some desire on the mailing list to create a separate logfile for slow queries. Currently it is not possible to do this cleanly, because the WARN level used by slow query logging within the SolrCore class is also used for other events that SolrCore can log. Those messages would be out of place in a slow query log. They should typically stay in main solr logfile.

      I propose creating a custom logger for slow queries, similar to what has been set up for request logging. In the SolrCore class, which is org.apache.solr.core.SolrCore, there is a special logger at org.apache.solr.core.SolrCore.Request. This is not a real class, just a logger which makes it possible to handle those log messages differently than the rest of Solr's logging. I propose setting up another custom logger within SolrCore which could be org.apache.solr.core.SolrCore.SlowRequest.

        Attachments

        1. SOLR-11453.patch
          18 kB
          Varun Thacker
        2. SOLR-11453.patch
          15 kB
          Varun Thacker
        3. slowlog-informational.patch
          14 kB
          Shawn Heisey
        4. slowlog-informational.patch
          13 kB
          Shawn Heisey
        5. slowlog-informational.patch
          4 kB
          Shawn Heisey
        6. SOLR-11453.patch
          5 kB
          Varun Thacker
        7. SOLR-11453.patch
          2 kB
          Shawn Heisey
        8. SOLR-11453.patch
          2 kB
          Shawn Heisey
        9. SOLR-11453.patch
          2 kB
          Shawn Heisey

          Issue Links

            Activity

              People

              • Assignee:
                varunthacker Varun Thacker
                Reporter:
                elyograg Shawn Heisey
              • Votes:
                1 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: