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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
     new a931fb96ea Call getConfigClass on the right host
a931fb96ea is described below

commit a931fb96ea6608a9d297c1274a7b7ae491a94c97
Author: remm <[email protected]>
AuthorDate: Tue May 26 10:09:17 2026 +0200

    Call getConfigClass on the right host
    
    Also fix logger name missing the context name (unlike
    ContainerBase.logName).
---
 java/org/apache/catalina/startup/Tomcat.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/startup/Tomcat.java 
b/java/org/apache/catalina/startup/Tomcat.java
index 4d91314581..9d444f83f6 100644
--- a/java/org/apache/catalina/startup/Tomcat.java
+++ b/java/org/apache/catalina/startup/Tomcat.java
@@ -690,7 +690,7 @@ public class Tomcat {
     public Context addWebapp(Host host, String contextPath, String docBase) {
         LifecycleListener listener;
         try {
-            Class<?> clazz = Class.forName(getHost().getConfigClass());
+            Class<?> clazz = Class.forName(host.getConfigClass());
             listener = (LifecycleListener) 
clazz.getConstructor().newInstance();
         } catch (ReflectiveOperationException e) {
             // Wrap in IAE since we can't easily change the method signature
@@ -942,6 +942,8 @@ public class Tomcat {
         } else if (contextName.startsWith("##")) {
             loggerName.append('/');
             loggerName.append(contextName);
+        } else {
+            loggerName.append(contextName);
         }
         loggerName.append(']');
 


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

Reply via email to