diff --git a/solr/core/src/java/org/apache/solr/core/ConfigSolr.java b/solr/core/src/java/org/apache/solr/core/ConfigSolr.java index 56252a490d2..f864402fda8 100644 --- a/solr/core/src/java/org/apache/solr/core/ConfigSolr.java +++ b/solr/core/src/java/org/apache/solr/core/ConfigSolr.java @@ -189,7 +189,7 @@ public abstract class ConfigSolr { public LogWatcherConfig getLogWatcherConfig() { return new LogWatcherConfig( - getBool(CfgProp.SOLR_LOGGING_ENABLED, false), + getBool(CfgProp.SOLR_LOGGING_ENABLED, true), get(CfgProp.SOLR_LOGGING_CLASS, null), get(CfgProp.SOLR_LOGGING_WATCHER_THRESHOLD, null), getInt(CfgProp.SOLR_LOGGING_WATCHER_SIZE, 50) diff --git a/solr/core/src/java/org/apache/solr/core/CoreContainer.java b/solr/core/src/java/org/apache/solr/core/CoreContainer.java index cba18618b07..fb53869a7ea 100644 --- a/solr/core/src/java/org/apache/solr/core/CoreContainer.java +++ b/solr/core/src/java/org/apache/solr/core/CoreContainer.java @@ -29,7 +29,6 @@ import org.apache.solr.handler.admin.CoreAdminHandler; import org.apache.solr.handler.admin.InfoHandler; import org.apache.solr.handler.component.ShardHandlerFactory; import org.apache.solr.logging.LogWatcher; -import org.apache.solr.logging.jul.JulWatcher; import org.apache.solr.schema.IndexSchema; import org.apache.solr.schema.IndexSchemaFactory; import org.apache.solr.util.DefaultSolrThreadFactory; @@ -193,7 +192,7 @@ public class CoreContainer { solrCores.allocateLazyCores(cfg.getTransientCacheSize(), loader); - logging = JulWatcher.newRegisteredLogWatcher(cfg.getLogWatcherConfig(), loader); + logging = LogWatcher.newRegisteredLogWatcher(cfg.getLogWatcherConfig(), loader); shareSchema = cfg.hasSchemaCache(); 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 23f260ba4ef..861635587ae 100644 --- a/solr/core/src/java/org/apache/solr/logging/LogWatcher.java +++ b/solr/core/src/java/org/apache/solr/logging/LogWatcher.java @@ -126,8 +126,10 @@ public abstract class LogWatcher { */ public static LogWatcher newRegisteredLogWatcher(LogWatcherConfig config, SolrResourceLoader loader) { - if (!config.isEnabled()) + if (!config.isEnabled()) { + log.info("A LogWatcher is not enabled"); return null; + } LogWatcher logWatcher = createWatcher(config, loader); @@ -148,6 +150,7 @@ public abstract class LogWatcher { try { slf4jImpl = StaticLoggerBinder.getSingleton().getLoggerFactoryClassStr(); + log.info("SLF4J impl is " + slf4jImpl); if (fname == null) { if (slf4jImpl.indexOf("Log4j") > 0) { fname = "Log4j";