From 0c95712ee42d2a461fd1d6b48a6312e7ba172fe6 Mon Sep 17 00:00:00 2001 From: Alan Woodward Date: Wed, 23 Oct 2013 15:47:00 +0000 Subject: [PATCH] SOLR-5363: Solr doesn't start up properly with Log4J2 git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1535065 13f79535-47bb-0310-9956-ffa450edef68 --- solr/CHANGES.txt | 3 +++ solr/core/src/java/org/apache/solr/logging/LogWatcher.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index db7fb646748..8d7d42f700c 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -119,6 +119,9 @@ Bug Fixes * SOLR-5371: Solr should consistently call SolrServer#shutdown (Mark Miller) +* SOLR-5363: Solr doesn't start up properly with Log4J2 (Petar Tahchiev via Alan + Woodward) + Optimizations ---------------------- diff --git a/solr/core/src/java/org/apache/solr/logging/LogWatcher.java b/solr/core/src/java/org/apache/solr/logging/LogWatcher.java index 861635587ae..2943fb3832a 100644 --- a/solr/core/src/java/org/apache/solr/logging/LogWatcher.java +++ b/solr/core/src/java/org/apache/solr/logging/LogWatcher.java @@ -152,7 +152,7 @@ public abstract class LogWatcher { slf4jImpl = StaticLoggerBinder.getSingleton().getLoggerFactoryClassStr(); log.info("SLF4J impl is " + slf4jImpl); if (fname == null) { - if (slf4jImpl.indexOf("Log4j") > 0) { + if ("org.slf4j.impl.Log4jLoggerFactory".equals(slf4jImpl)) { fname = "Log4j"; } else if (slf4jImpl.indexOf("JDK") > 0) { fname = "JUL";