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

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 3a58962c00 Raise log level for missing configuration
3a58962c00 is described below

commit 3a58962c00a36f650110900c44ed66478ee20be2
Author: remm <[email protected]>
AuthorDate: Mon Nov 10 21:40:53 2025 +0100

    Raise log level for missing configuration
    
    Although not an error, it could be unintended and is not visible right
    now.
    BZ69871
---
 java/org/apache/catalina/valves/rewrite/RewriteValve.java | 15 +++++++++------
 webapps/docs/changelog.xml                                |  8 ++++++++
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/valves/rewrite/RewriteValve.java 
b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
index fb184d9d69..976936692d 100644
--- a/java/org/apache/catalina/valves/rewrite/RewriteValve.java
+++ b/java/org/apache/catalina/valves/rewrite/RewriteValve.java
@@ -154,15 +154,18 @@ public class RewriteValve extends ValveBase {
 
         InputStream is = null;
 
+        // Process configuration file for this valve
         // Process configuration file for this valve
         if (getContainer() instanceof Context) {
             context = true;
             String webInfResourcePath = "/WEB-INF/" + resourcePath;
             is = ((Context) 
getContainer()).getServletContext().getResourceAsStream(webInfResourcePath);
-            if (containerLog.isDebugEnabled()) {
-                if (is == null) {
-                    
containerLog.debug(sm.getString("rewriteValve.noConfiguration", 
webInfResourcePath));
-                } else {
+            if (is == null) {
+                if (containerLog.isInfoEnabled()) {
+                    
containerLog.info(sm.getString("rewriteValve.noConfiguration", 
webInfResourcePath));
+                }
+            } else {
+                if (containerLog.isDebugEnabled()) {
                     
containerLog.debug(sm.getString("rewriteValve.readConfiguration", 
webInfResourcePath));
                 }
             }
@@ -172,8 +175,8 @@ public class RewriteValve extends ValveBase {
                 ConfigurationSource.Resource resource = 
ConfigFileLoader.getSource().getResource(resourceName);
                 is = resource.getInputStream();
             } catch (IOException ioe) {
-                if (containerLog.isDebugEnabled()) {
-                    
containerLog.debug(sm.getString("rewriteValve.noConfiguration", resourceName), 
ioe);
+                if (containerLog.isInfoEnabled()) {
+                    
containerLog.info(sm.getString("rewriteValve.noConfiguration", resourceName), 
ioe);
                 }
             }
         }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 01ba04d3ba..f64474c14a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
   issues do not "pop up" wrt. others).
 -->
 <section name="Tomcat 9.0.113 (remm)" rtext="in development">
+  <subsection name="Catalina">
+    <changelog>
+      <fix>
+        <bug>69871</bug>: Increase log level to INFO for missing configuration
+        for the rewrite valve. (remm)
+      </fix>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 9.0.112 (remm)" rtext="release in progress">
   <subsection name="Catalina">


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to