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
This commit is contained in:
Alan Woodward 2013-10-23 15:47:00 +00:00
parent e29c49f458
commit 0c95712ee4
2 changed files with 4 additions and 1 deletions

View File

@ -119,6 +119,9 @@ Bug Fixes
* SOLR-5371: Solr should consistently call SolrServer#shutdown (Mark Miller) * 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 Optimizations
---------------------- ----------------------

View File

@ -152,7 +152,7 @@ public abstract class LogWatcher<E> {
slf4jImpl = StaticLoggerBinder.getSingleton().getLoggerFactoryClassStr(); slf4jImpl = StaticLoggerBinder.getSingleton().getLoggerFactoryClassStr();
log.info("SLF4J impl is " + slf4jImpl); log.info("SLF4J impl is " + slf4jImpl);
if (fname == null) { if (fname == null) {
if (slf4jImpl.indexOf("Log4j") > 0) { if ("org.slf4j.impl.Log4jLoggerFactory".equals(slf4jImpl)) {
fname = "Log4j"; fname = "Log4j";
} else if (slf4jImpl.indexOf("JDK") > 0) { } else if (slf4jImpl.indexOf("JDK") > 0) {
fname = "JUL"; fname = "JUL";