You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by ma...@apache.org on 2021/10/07 21:10:21 UTC
[solr] branch main updated: SOLR-15640: Flush / Shutdown Async
Loggers and LogManager after a test. (#301)
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 0c8ee31 SOLR-15640: Flush / Shutdown Async Loggers and LogManager after a test. (#301)
0c8ee31 is described below
commit 0c8ee317fdd3247a1554ebd756a68934e8499b72
Author: Mark Robert Miller <ma...@gmail.com>
AuthorDate: Thu Oct 7 16:09:32 2021 -0500
SOLR-15640: Flush / Shutdown Async Loggers and LogManager after a test. (#301)
---
.../src/java/org/apache/solr/util/StartupLoggingUtils.java | 2 +-
.../test-framework/src/java/org/apache/solr/SolrTestCase.java | 11 -----------
2 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/util/StartupLoggingUtils.java b/solr/core/src/java/org/apache/solr/util/StartupLoggingUtils.java
index 53f19b9..c3c749d 100644
--- a/solr/core/src/java/org/apache/solr/util/StartupLoggingUtils.java
+++ b/solr/core/src/java/org/apache/solr/util/StartupLoggingUtils.java
@@ -114,7 +114,7 @@ public final class StartupLoggingUtils {
private static boolean isLog4jActive() {
try {
// Make sure we have log4j LogManager in classpath
- Class.forName("org.apache.log4j.LogManager");
+ Class.forName("org.apache.logging.log4j.LogManager");
// Make sure that log4j is really selected as logger in slf4j - we could have LogManager in the bridge class :)
return binder.getLoggerFactoryClassStr().contains("Log4jLoggerFactory");
} catch (Exception e) {
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
index 0cda87b..d0e754a 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
@@ -65,17 +65,6 @@ import com.carrotsearch.randomizedtesting.annotations.ThreadLeakFilters;
@ThreadLeakLingering(linger = 10000)
public class SolrTestCase extends LuceneTestCase {
- /**
- * <b>DO NOT REMOVE THIS LOGGER</b>
- * <p>
- * For reasons that aren't 100% obvious, the existence of this logger is neccessary to ensure
- * that the logging framework is properly initialized (even if concrete subclasses do not
- * themselves initialize any loggers) so that the async logger threads can be properly shutdown
- * on completion of the test suite
- * </p>
- * @see <a href="https://issues.apache.org/jira/browse/SOLR-14247">SOLR-14247</a>
- * @see #afterSolrTestCase()
- */
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private static final Pattern NAMING_CONVENTION_TEST_SUFFIX = Pattern.compile("(.+\\.)([^.]+)(Test)");