remm        2004/06/24 15:09:52

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardContext.java
  Log:
  - Small tweak to the logger name for the root context.
  
  Revision  Changes    Path
  1.133     +23 -1     
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.132
  retrieving revision 1.133
  diff -u -r1.132 -r1.133
  --- StandardContext.java      24 Jun 2004 15:28:27 -0000      1.132
  +++ StandardContext.java      24 Jun 2004 22:09:52 -0000      1.133
  @@ -4715,6 +4715,28 @@
       }
   
   
  +    /**
  +     * 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to