diff --git a/dev-tools/eclipse/run-solr-cloud.launch b/dev-tools/eclipse/run-solr-cloud.launch
index 493cb7592f5..c9d5dbbe9f4 100644
--- a/dev-tools/eclipse/run-solr-cloud.launch
+++ b/dev-tools/eclipse/run-solr-cloud.launch
@@ -16,5 +16,5 @@
-
+
diff --git a/dev-tools/eclipse/run-solr.launch b/dev-tools/eclipse/run-solr.launch
index dc167d0e74f..00f225dacc8 100644
--- a/dev-tools/eclipse/run-solr.launch
+++ b/dev-tools/eclipse/run-solr.launch
@@ -16,5 +16,5 @@
-
+
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 865fecf1866..33525c5de14 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -52,6 +52,8 @@ Jetty 9.4.8.v20171121
Upgrade Notes
----------------------
+* SOLR-7887: Solr now uses Log4J 2.11. The log4j configuration is now in log4j2.xml rather than lo4j.properties files
+
New Features
----------------------
@@ -61,6 +63,9 @@ New Features
* SOLR-12015: Add support "add-distinct" in AtomicURP so that we can use the 'add-distict' as a request parameter e.g:
atomic.=add-distict (Amrit Sarkar via noble)
+* SOLR-7887: Upgrade Solr to use Log4J 2.11
+ (Tim Potter, Keith Laban, Shawn Heisey, Ralph Goers, Erick Erickson, Varun Thacker)
+
Bug Fixes
----------------------
@@ -166,9 +171,6 @@ Upgrade Notes
from the earlier default of 30 seconds. This affects how soon Solr adds new replicas to replace the replicas
on nodes which have either crashed or shutdown.
-* SOLR-7887: Solr now uses Log4J 2.10. The log4j configuration is now in log4j2.xml rather than lo4j.properties
- files (Shawn Heisey, Keith Laban, Timothy Potter, Varun Thacker, Erick Erickson,
-
New Features
----------------------
* SOLR-11285: Simulation framework for autoscaling. (ab)
@@ -492,8 +494,6 @@ Other Changes
* SOLR-12097: Document the diskType policy attribute and usage of disk space in Collection APIs.
(Cassandra Targett, shalin)
-* SOLR-7887: Upgrade Solr to Log4J 2.10 (Tim Potter, Keith Laban, Shawn Heisey, Ralph Goers, Varun Thacker)
-
================== 7.2.1 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index ab32d230c66..35e6ae916f9 100644
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -1366,7 +1366,7 @@ goto done
:run_config
"%JAVA%" %SOLR_SSL_OPTS% %AUTHC_OPTS% %SOLR_ZK_CREDS_AND_ACLS% -Dsolr.install.dir="%SOLR_TIP%" ^
- -Dlog4j.configuration="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j2.xml" ^
+ -Dlog4j.configurationFile="file:%DEFAULT_SERVER_DIR%\scripts\cloud-scripts\log4j2.xml" ^
-classpath "%DEFAULT_SERVER_DIR%\solr-webapp\webapp\WEB-INF\lib\*;%DEFAULT_SERVER_DIR%\lib\ext\*" ^
org.apache.solr.util.SolrCLI %*
if errorlevel 1 (
diff --git a/solr/contrib/ltr/src/test-files/log4j2.xml b/solr/contrib/ltr/src/test-files/log4j2.xml
index 5acf4d02545..b4678c171d7 100644
--- a/solr/contrib/ltr/src/test-files/log4j2.xml
+++ b/solr/contrib/ltr/src/test-files/log4j2.xml
@@ -31,7 +31,6 @@
-
diff --git a/solr/contrib/prometheus-exporter/bin/solr-exporter b/solr/contrib/prometheus-exporter/bin/solr-exporter
index bf28488f92e..751e6c76f09 100755
--- a/solr/contrib/prometheus-exporter/bin/solr-exporter
+++ b/solr/contrib/prometheus-exporter/bin/solr-exporter
@@ -100,7 +100,7 @@ do
CLASSPATH="$CLASSPATH":"$JAR"
done
-EXTRA_JVM_ARGUMENTS="-Xmx512m -Dlog4j.configuration=file:"$BASEDIR"/conf/log4j.properties"
+EXTRA_JVM_ARGUMENTS="-Xmx512m -Dlog4j.configurationFile=file:"$BASEDIR"/conf/log4j2.xml"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
diff --git a/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd b/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd
index 05d8275cfef..8fa4f604401 100644
--- a/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd
+++ b/solr/contrib/prometheus-exporter/bin/solr-exporter.cmd
@@ -69,7 +69,7 @@ if "%JAVACMD%"=="" set JAVACMD=java
if "%REPO%"=="" set REPO=%BASEDIR%\lib
set CLASSPATH="%CLASSPATH%";"%REPO%\*;%BASEDIR%\..\..\dist\solrj-lib\*;%BASEDIR%\..\..\dist\solr-core-*;%BASEDIR%\..\..\dist\solr-solrj-*;%BASEDIR%\..\..\dist\solr-prometheus-exporter-*;%BASEDIR%\lib\*"
-set EXTRA_JVM_ARGUMENTS=-Xmx512m -Dlog4j.configuration=file:%BASEDIR%/conf/log4j.properties
+set EXTRA_JVM_ARGUMENTS=-Xmx512m -Dlog4j.configurationFile=file:%BASEDIR%/conf/log4j2.xml
goto endInit
@REM Reaching here means variables are defined and arguments have been captured
diff --git a/solr/contrib/prometheus-exporter/ivy.xml b/solr/contrib/prometheus-exporter/ivy.xml
index 2c678254582..7d62a3e1b19 100644
--- a/solr/contrib/prometheus-exporter/ivy.xml
+++ b/solr/contrib/prometheus-exporter/ivy.xml
@@ -32,7 +32,7 @@
-
+
diff --git a/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java b/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
index 745341ae0db..23a8dc1eb3d 100644
--- a/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
+++ b/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
@@ -363,7 +363,7 @@ public class JettySolrRunner {
*
* If the server has been started before, it will restart using the same port
*
- * @throws java.lang.Exception if an error occurs on startup
+ * @throws Exception if an error occurs on startup
*/
public void start() throws Exception {
start(true);
diff --git a/solr/example/resources/log4j2.xml b/solr/example/resources/log4j2.xml
index c6267d441b9..ebb40290e4c 100644
--- a/solr/example/resources/log4j2.xml
+++ b/solr/example/resources/log4j2.xml
@@ -27,8 +27,8 @@
+ fileName="${sys:solr.log.dir}/solr.log"
+ filePattern="${sys:solr.log.dir}/solr.%i.log" >
%-5p - %d{yyyy-MM-dd HH:mm:ss.SSS}; [%X{collection} %X{shard} %X{replica} %X{core}] %c; %m%n
@@ -36,8 +36,9 @@
-
+
+
diff --git a/solr/server/resources/log4j2.xml b/solr/server/resources/log4j2.xml
index c8b162ae0d7..85ac2303e5c 100644
--- a/solr/server/resources/log4j2.xml
+++ b/solr/server/resources/log4j2.xml
@@ -27,8 +27,8 @@
+ fileName="${sys:solr.log.dir}/solr.log"
+ filePattern="${sys:solr.log.dir}/solr.%i.log" >
%d{yyyy-MM-dd HH:mm:ss.SSS} %-5p (%t) [%X{collection} %X{shard} %X{replica} %X{core}] %c{1.} %m%n
@@ -36,8 +36,9 @@
-
+
+
diff --git a/solr/server/scripts/cloud-scripts/log4j2.xml b/solr/server/scripts/cloud-scripts/log4j2.xml
index b06ed8127af..bd90f7747f2 100644
--- a/solr/server/scripts/cloud-scripts/log4j2.xml
+++ b/solr/server/scripts/cloud-scripts/log4j2.xml
@@ -28,7 +28,7 @@
-
+
diff --git a/solr/solr-ref-guide/src/configuring-logging.adoc b/solr/solr-ref-guide/src/configuring-logging.adoc
index 15e47c933b3..af8db2732d5 100644
--- a/solr/solr-ref-guide/src/configuring-logging.adoc
+++ b/solr/solr-ref-guide/src/configuring-logging.adoc
@@ -84,7 +84,7 @@ bin/solr start -f -q
== Permanent Logging Settings
-Solr uses http://logging.apache.org/log4j/{ivy-log4j-version}/[Log4J version {ivy-log4j-version}] for logging which is configured using `server/resources/log4j.properties`. Take a moment to inspect the contents of the `log4j.properties` file so that you are familiar with its structure. By default, Solr log messages will be written to `SOLR_LOGS_DIR/solr.log`.
+Solr uses http://logging.apache.org/log4j/{ivy-log4j-version}/[Log4J version {ivy-log4j-version}] for logging which is configured using `server/resources/log4j2.xml`. Take a moment to inspect the contents of the `log4j2.xml` file so that you are familiar with its structure. By default, Solr log messages will be written to `SOLR_LOGS_DIR/solr.log`.
When you're ready to deploy Solr in production, set the variable `SOLR_LOGS_DIR` to the location where you want Solr to write log files, such as `/var/solr/logs`. You may also want to tweak `log4j2.xml`. Note that if you installed Solr as a service using the instructions provided in <>, then see `/var/solr/log4j2.xml` instead of the default `server/resources` version.
diff --git a/solr/solrj/src/test-files/log4j2.xml b/solr/solrj/src/test-files/log4j2.xml
index b5421a819f5..7d0ebf7a497 100644
--- a/solr/solrj/src/test-files/log4j2.xml
+++ b/solr/solrj/src/test-files/log4j2.xml
@@ -30,7 +30,7 @@
-
+
diff --git a/solr/test-framework/src/test-files/log4j2.xml b/solr/test-framework/src/test-files/log4j2.xml
index b5421a819f5..7d0ebf7a497 100644
--- a/solr/test-framework/src/test-files/log4j2.xml
+++ b/solr/test-framework/src/test-files/log4j2.xml
@@ -30,7 +30,7 @@
-
+