diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 3ee0834653b..945e2b508a7 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -164,6 +164,8 @@ Bug Fixes * SOLR-16955: Tracing v2 apis breaks SecurityConfHandler (Alex Deparvu, David Smiley) +* SOLR-16044: SlowRequest logging is no longer disabled if SolrCore logger set to ERROR (janhoy, hossman) + Dependency Upgrades --------------------- diff --git a/solr/core/src/java/org/apache/solr/core/SolrCore.java b/solr/core/src/java/org/apache/solr/core/SolrCore.java index b1c723aa7a5..944d4684016 100644 --- a/solr/core/src/java/org/apache/solr/core/SolrCore.java +++ b/solr/core/src/java/org/apache/solr/core/SolrCore.java @@ -2901,7 +2901,7 @@ public void execute(SolrRequestHandler handler, SolrQueryRequest req, SolrQueryR } /* slowQueryThresholdMillis defaults to -1 in SolrConfig -- not enabled.*/ - if (log.isWarnEnabled() && slowQueryThresholdMillis >= 0) { + if (slowLog.isWarnEnabled() && slowQueryThresholdMillis >= 0) { final long qtime = (long) (req.getRequestTimer().getTime()); if (qtime >= slowQueryThresholdMillis) { slowLog.warn("slow: {}", rsp.getToLogAsString()); diff --git a/solr/core/src/java/org/apache/solr/jersey/PostRequestLoggingFilter.java b/solr/core/src/java/org/apache/solr/jersey/PostRequestLoggingFilter.java index 4ce9490c115..3925b297d6a 100644 --- a/solr/core/src/java/org/apache/solr/jersey/PostRequestLoggingFilter.java +++ b/solr/core/src/java/org/apache/solr/jersey/PostRequestLoggingFilter.java @@ -101,7 +101,7 @@ public void filter( response.responseHeader.qTime); /* slowQueryThresholdMillis defaults to -1 in SolrConfig -- not enabled.*/ - if (log.isWarnEnabled() + if (slowCoreRequestLogger.isWarnEnabled() && solrConfig != null && solrConfig.slowQueryThresholdMillis >= 0 && response.responseHeader.qTime >= solrConfig.slowQueryThresholdMillis) {