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

rmaucher 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 8b28c3d2f9 Call getConfigClass on the right host
8b28c3d2f9 is described below

commit 8b28c3d2f91fe797e30e9b88c0f3a4126fd12c31
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 f82c320453..ad0719b26d 100644
--- a/java/org/apache/catalina/startup/Tomcat.java
+++ b/java/org/apache/catalina/startup/Tomcat.java
@@ -693,7 +693,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
@@ -945,6 +945,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