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

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


The following commit(s) were added to refs/heads/main by this push:
     new 4b440d87b4 Call getConfigClass on the right host
4b440d87b4 is described below

commit 4b440d87b4c145afade904531f20b848dc1d6c30
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 97f130ace0..1d9c8a88aa 100644
--- a/java/org/apache/catalina/startup/Tomcat.java
+++ b/java/org/apache/catalina/startup/Tomcat.java
@@ -689,7 +689,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
@@ -941,6 +941,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