tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core ContainerBase.java StandardContext.java
Date Fri, 11 Mar 2005 17:00:28 GMT
remm        2005/03/11 09:00:28

  Modified:    catalina/src/share/org/apache/catalina/core
                        ContainerBase.java StandardContext.java
  Log:
  - Fix bad logger name for root context, with a small kludge (but since [] isn't a valid
logger name, it should be a decent default).
  
  Revision  Changes    Path
  1.40      +6 -1      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ContainerBase.java
  
  Index: ContainerBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ContainerBase.java,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- ContainerBase.java	29 Jan 2005 19:41:16 -0000	1.39
  +++ ContainerBase.java	11 Mar 2005 17:00:28 -0000	1.40
  @@ -1342,11 +1342,16 @@
           String loggerName = null;
           Container current = this;
           while (current != null) {
  -            loggerName = "[" + current.getName() + "]" 
  +            String name = current.getName();
  +            if ((name == null) || (name.equals(""))) {
  +                name = "/";
  +            }
  +            loggerName = "[" + name + "]" 
                   + ((loggerName != null) ? ("." + loggerName) : "");
               current = current.getParent();
           }
           logName = ContainerBase.class.getName() + "." + loggerName;
  +        System.out.println(logName);
           return logName;
           
       }
  
  
  
  1.167     +1 -23     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.166
  retrieving revision 1.167
  diff -u -r1.166 -r1.167
  --- StandardContext.java	2 Mar 2005 18:14:06 -0000	1.166
  +++ StandardContext.java	11 Mar 2005 17:00:28 -0000	1.167
  @@ -4444,28 +4444,6 @@
       }
   
   
  -    /**
  -     * Return the abbreviated name of this container for logging messsages
  -     */
  -    protected String logName() {
  -
  -        if (logName != null) {
  -            return logName;
  -        }
  -        String loggerName = ((getName() == null) || (getName().equals(""))) 
  -                             ? "[/]" : ("[" + getName() + "]");
  -        Container current = getParent();
  -        while (current != null) {
  -            loggerName = "[" + current.getName() + "]" 
  -                + ((loggerName != null) ? ("." + loggerName) : "");
  -            current = current.getParent();
  -        }
  -        logName = ContainerBase.class.getName() + "." + loggerName;
  -        return logName;
  -        
  -    }
  -
  -    
       // -------------------------------------------------------- Private Methods
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message