This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_10x by this push:
     new 8e1a7d4150a Rename solr.log.requestlog.retaindays to 
solr.logs.requestlog.retain.days (#3856)
8e1a7d4150a is described below

commit 8e1a7d4150a8eddde5eb59bba3f7157f73941155
Author: Eric Pugh <[email protected]>
AuthorDate: Fri Nov 14 15:47:44 2025 -0500

    Rename solr.log.requestlog.retaindays to solr.logs.requestlog.retain.days 
(#3856)
    
    Rename property, and fix bug that only the default number of days was 
logged, even when solr.logs.requestlog.retain.days was set.
---
 solr/bin/solr                                      |  2 +-
 solr/bin/solr.cmd                                  |  6 +++---
 solr/bin/solr.in.cmd                               |  2 +-
 solr/bin/solr.in.sh                                |  2 +-
 .../org/apache/solr/util/StartupLoggingUtils.java  |  7 +++---
 solr/server/etc/jetty-requestlog.xml               | 10 ++++++---
 .../configuration-guide/pages/solr-properties.adoc | 25 +++++++++++++++++++---
 .../pages/configuring-logging.adoc                 |  4 ++--
 .../src/resources/EnvToSyspropMappings.properties  |  2 +-
 9 files changed, 42 insertions(+), 18 deletions(-)

diff --git a/solr/bin/solr b/solr/bin/solr
index a2ff10cbba5..d17f00a4013 100755
--- a/solr/bin/solr
+++ b/solr/bin/solr
@@ -306,7 +306,7 @@ if [ "${SOLR_JETTY_GRACEFUL:-false}" == "true" ]; then
 fi
 
 # Requestlog options
-if [ "${SOLR_REQUESTLOG_ENABLED:-true}" == "true" ]; then
+if [ "${SOLR_LOGS_REQUESTLOG_ENABLED:-true}" == "true" ]; then
   SOLR_JETTY_CONFIG+=("--module=requestlog")
 fi
 
diff --git a/solr/bin/solr.cmd b/solr/bin/solr.cmd
index 1d37b98056c..44262f4f974 100755
--- a/solr/bin/solr.cmd
+++ b/solr/bin/solr.cmd
@@ -181,10 +181,10 @@ IF "%SOLR_SSL_ENABLED%"=="true" (
 )
 
 REM Requestlog options
-IF NOT DEFINED SOLR_REQUESTLOG_ENABLED (
-  set SOLR_REQUESTLOG_ENABLED=true
+IF NOT DEFINED SOLR_LOGS_REQUESTLOG_ENABLED (
+  set SOLR_LOGS_REQUESTLOG_ENABLED=true
 )
-IF "%SOLR_REQUESTLOG_ENABLED%"=="true" (
+IF "%SOLR_LOGS_REQUESTLOG_ENABLED%"=="true" (
   set "SOLR_JETTY_CONFIG=!SOLR_JETTY_CONFIG! --module=requestlog"
 )
 
diff --git a/solr/bin/solr.in.cmd b/solr/bin/solr.in.cmd
index ebada5438c5..4adaa748a05 100755
--- a/solr/bin/solr.in.cmd
+++ b/solr/bin/solr.in.cmd
@@ -114,7 +114,7 @@ REM Location where Solr should write logs to. Absolute or 
relative to solr start
 REM set SOLR_LOGS_DIR=logs
 
 REM Enables jetty request log for all requests
-REM set SOLR_REQUESTLOG_ENABLED=true
+REM set SOLR_LOGS_REQUESTLOG_ENABLED=true
 
 REM Sets the port Solr binds to, default is 8983
 REM set SOLR_PORT_LISTEN=8983
diff --git a/solr/bin/solr.in.sh b/solr/bin/solr.in.sh
index 9db413a4219..8fae75a820e 100644
--- a/solr/bin/solr.in.sh
+++ b/solr/bin/solr.in.sh
@@ -129,7 +129,7 @@
 #SOLR_LOGS_DIR=logs
 
 # Enables jetty request log for all requests
-#SOLR_REQUESTLOG_ENABLED=true
+#SOLR_LOGS_REQUESTLOG_ENABLED=true
 
 # Sets the port Solr binds to, default is 8983
 #SOLR_PORT_LISTEN=8983
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 73ddc50fe3d..8fbebffcdd3 100644
--- a/solr/core/src/java/org/apache/solr/util/StartupLoggingUtils.java
+++ b/solr/core/src/java/org/apache/solr/util/StartupLoggingUtils.java
@@ -207,11 +207,12 @@ public final class StartupLoggingUtils {
 
   /**
    * Check whether Jetty request logging is enabled and log info about it. The 
property
-   * "solr.log.requestlog.enabled is set in 
solr/server/etc/jetty-requestlog.xml
+   * "solr.logs.requestlog.enabled is set in 
solr/server/etc/jetty-requestlog.xml
    */
   public static void checkRequestLogging() {
-    boolean requestLogEnabled = 
Boolean.getBoolean("solr.log.requestlog.enabled");
-    String retainDays = System.getProperty("solr.log.requestlog.retaindays");
+    // EnvUtils doesn't work here.
+    boolean requestLogEnabled = 
Boolean.getBoolean("solr.logs.requestlog.enabled");
+    String retainDays = System.getProperty("solr.logs.requestlog.retain.days");
     if (requestLogEnabled) {
       if (retainDays == null) {
         log.warn(
diff --git a/solr/server/etc/jetty-requestlog.xml 
b/solr/server/etc/jetty-requestlog.xml
index dee4a585182..547967fb6b1 100644
--- a/solr/server/etc/jetty-requestlog.xml
+++ b/solr/server/etc/jetty-requestlog.xml
@@ -30,7 +30,7 @@
         <New class="org.eclipse.jetty.server.AsyncRequestLogWriter">
           <Arg><Property name="solr.logs.dir" 
default="logs"/>/yyyy_mm_dd.request.log</Arg>
           <Set name="filenameDateFormat">yyyy_MM_dd</Set>
-          <Set name="retainDays"><Property 
name="solr.log.requestlog.retaindays" default="3"/></Set>
+          <Set name="retainDays"><Property 
name="solr.logs.requestlog.retain.days" default="3"/></Set>
           <Set name="append">true</Set>
           <Set name="timeZone">UTC</Set>
         </New>
@@ -40,6 +40,10 @@
       <Arg><Get class="org.eclipse.jetty.server.CustomRequestLog" 
name="NCSA_FORMAT"/></Arg>
     </New>
   </Set>
-  <!-- System property used to detect inside of Solr whether the requestlog is 
enabled, for logging purposes -->
-  <Call class="java.lang.System" 
name="setProperty"><Arg>solr.log.requestlog.enabled</Arg><Arg>true</Arg></Call>
+  <!-- System properties to be used inside of Solr detecting if the requestlog 
is enabled, for logging purposes -->
+  <Call class="java.lang.System" 
name="setProperty"><Arg>solr.logs.requestlog.enabled</Arg><Arg>true</Arg></Call>
+  <Call class="java.lang.System" name="setProperty">
+    <Arg>solr.logs.requestlog.retain.days</Arg>
+    <Arg><Property name="solr.logs.requestlog.retain.days" default="3"/></Arg>
+  </Call>
 </Configure>
diff --git 
a/solr/solr-ref-guide/modules/configuration-guide/pages/solr-properties.adoc 
b/solr/solr-ref-guide/modules/configuration-guide/pages/solr-properties.adoc
index a34f654cce1..a635789006c 100644
--- a/solr/solr-ref-guide/modules/configuration-guide/pages/solr-properties.adoc
+++ b/solr/solr-ref-guide/modules/configuration-guide/pages/solr-properties.adoc
@@ -16,9 +16,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
+// In Solr 11 we should remove the Previous Property Name that are from the 9x 
versions of Solr.
+
 This page provides an alphabetical reference of Solr system properties that 
can be used to configure various aspects of Solr. Where applicable, previous 
property names are also listed.
 
-NOTE: Properties marked with "!" indicate inverted meaning between old and new 
properties. For example, if the old property was `disable.config.edit=false`, 
the equivalent setting with the new property would be 
`solr.api.config.edit.enabled=true`.
+NOTE: Properties marked with "!" indicate inverted meaning between pre Solr 10 
and Solr 10 properties. For example, if the old property was 
`disable.config.edit=false`, the equivalent setting with the new property would 
be `solr.api.config.edit.enabled=true`.
 
 == System Properties
 
@@ -68,6 +70,10 @@ NOTE: Properties marked with "!" indicate inverted meaning 
between old and new p
 
 |solr.logs.dir|solr.log.dir|server/logs|Specifies the directory where Solr 
logs are stored.
 
+|SOLR_LOGS_REQUESTLOG_ENABLED |SOLR_REQUESTLOG_ENABLED|true|Specifies if 
Jetty's request logs should be created and retained.
+
+|solr.logs.requestlog.retain.days|solr.log.requestlog.retaindays|3|How many 
days of request logs to retain before rolling over.
+
 
|solr.metrics.fieldcache.entries.enabled|!disableSolrFieldCacheMBeanEntryList|true|Controls
 whether Solr FieldCache MBean entry list is disabled for metrics reporting.
 
 
|solr.metrics.fieldcache.entries.jmx.enabled|!disableSolrFieldCacheMBeanEntryListJmx|true|Controls
 whether Solr FieldCache MBean JMX entry list is disabled for metrics reporting.
@@ -98,7 +104,6 @@ NOTE: Properties marked with "!" indicate inverted meaning 
between old and new p
 
 |solr.security.allow.urls.enabled|!solr.disable.allow.urls|false|If using an 
allow list of accessible urls is enabled. 
 
-
 |solr.security.auth.plugin|authenticationPlugin||Specifies the authentication 
plugin to use.
 
 |solr.solrj.cloud.max.stale.retries|cloudSolrClientMaxStaleRetries|5|Sets the 
maximum number of retries for stale connection attempts in SolrJ cloud client.
@@ -107,7 +112,6 @@ NOTE: Properties marked with "!" indicate inverted meaning 
between old and new p
 
 
|solr.streamingexpressions.macros.enabled|StreamingExpressionMacros|false|Controls
 whether to expand URL parameters inside of the `expr` parameter.
 
-
 |solr.tracing.always.on.enabled|solr.alwaysOnTraceId|true|Controls whether 
trace IDs are always generated, even when no request contains a trace ID.
 
 |solr.ui.enabled|!disableAdminUI|true|Controls whether the Solr Admin UI is 
enabled. When set to `true`, the Solr Admin UI is enabled.
@@ -130,6 +134,21 @@ NOTE: Properties marked with "!" indicate inverted meaning 
between old and new p
 
 |===
 
+=== Jetty related properties
+
+There are many other Jetty specific properties that can be overridden.
+
+See the source files in `solr/server/etc/` for more information:
+
+* 
https://github.com/apache/solr/blob/main/solr/server/etc/jetty.xml[jetty.xml] - 
Main Jetty server configuration
+* 
https://github.com/apache/solr/blob/main/solr/server/etc/jetty-http.xml[jetty-http.xml]
 - HTTP connector configuration
+* 
https://github.com/apache/solr/blob/main/solr/server/etc/jetty-https.xml[jetty-https.xml]
 - HTTPS connector configuration
+* 
https://github.com/apache/solr/blob/main/solr/server/etc/jetty-ssl.xml[jetty-ssl.xml]
 - SSL configuration
+* 
https://github.com/apache/solr/blob/main/solr/server/etc/jetty-ssl-context-reload.xml[jetty-ssl-context-reload.xml]
 - SSL context reload configuration
+* 
https://github.com/apache/solr/blob/main/solr/server/etc/jetty-gzip.xml[jetty-gzip.xml]
 - GZIP compression configuration
+* 
https://github.com/apache/solr/blob/main/solr/server/etc/jetty-requestlog.xml[jetty-requestlog.xml]
 - Request logging configuration
+* 
https://github.com/apache/solr/blob/main/solr/server/etc/jetty-graceful.xml[jetty-graceful.xml]
 - Graceful shutdown configuration
+
 == Property Naming Conventions
 
 Many Solr properties follow a standard naming convention. Newer properties 
typically use dot-separated format prefixed with `solr.` (e.g., 
`solr.my.property`), while older properties might camelCase (e.g., 
`solr.myProperty`).
diff --git 
a/solr/solr-ref-guide/modules/deployment-guide/pages/configuring-logging.adoc 
b/solr/solr-ref-guide/modules/deployment-guide/pages/configuring-logging.adoc
index ba303745656..c0f31a27cfe 100644
--- 
a/solr/solr-ref-guide/modules/deployment-guide/pages/configuring-logging.adoc
+++ 
b/solr/solr-ref-guide/modules/deployment-guide/pages/configuring-logging.adoc
@@ -191,5 +191,5 @@ For example:
 
 Every incoming HTTP(s) request is by default logged in the standard 
https://en.wikipedia.org/wiki/Common_Log_Format[`NCSA format`]
 in files with name `$SOLR_LOG_DIR/<yyyy_mm_dd>.request.log`, rolled over 
daily. By default, 3 days worth of request logs are retained.
-You can disable request logging by setting `SOLR_REQUESTLOG_ENABLED=false` via 
environment variable or in `solr.in.sh`/`solr.in.cmd`.
-You can change the number of days to retain by system property 
`-Dsolr.log.requestlog.retaindays`.
+You can disable request logging by setting 
`SOLR_LOGS_REQUESTLOG_ENABLED=false` via environment variable or in 
`solr.in.sh`/`solr.in.cmd`.
+You can change the number of days to retain by system property 
`-Dsolr.logs.requestlog.retain.days`.
diff --git a/solr/solrj/src/resources/EnvToSyspropMappings.properties 
b/solr/solrj/src/resources/EnvToSyspropMappings.properties
index 93067020cf7..7fd76588b20 100644
--- a/solr/solrj/src/resources/EnvToSyspropMappings.properties
+++ b/solr/solrj/src/resources/EnvToSyspropMappings.properties
@@ -61,7 +61,7 @@ SOLR_JAVA_STACK_SIZE=
 SOLR_JETTY_CONFIG=
 SOLR_OPTS=
 SOLR_OPTS_INTERNAL=
-SOLR_REQUESTLOG_ENABLED=
+SOLR_LOGS_REQUESTLOG_ENABLED=
 SOLR_SECURITY_MANAGER_ENABLED=
 SOLR_SERVER_DIR=
 SOLR_SSL_CHECK_PEER_NAME=

Reply via email to