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-connectors/juli/src/java/org/apache/juli ClassLoaderLogManager.java FileHandler.java
Date Thu, 03 Mar 2005 00:23:00 GMT
remm        2005/03/02 16:23:00

  Modified:    juli/src/java/org/apache/juli ClassLoaderLogManager.java
                        FileHandler.java
  Log:
  - Fix NPE caused by my last change.
  - Use ',' as separator for the handler lists.
  - Just noticed that java.util.logging does support a handlers property on loggers, and that
I reinvented it
    (I had been looking at the JDK 1.4 config files all along).
  
  Revision  Changes    Path
  1.3       +4 -4      jakarta-tomcat-connectors/juli/src/java/org/apache/juli/ClassLoaderLogManager.java
  
  Index: ClassLoaderLogManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/juli/src/java/org/apache/juli/ClassLoaderLogManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ClassLoaderLogManager.java	2 Mar 2005 21:40:00 -0000	1.2
  +++ ClassLoaderLogManager.java	3 Mar 2005 00:23:00 -0000	1.3
  @@ -150,9 +150,9 @@
           final String handlers = getProperty(loggerName + ".handlers");
           if (handlers != null) {
               logger.setUseParentHandlers(false);
  -            StringTokenizer tok = new StringTokenizer(handlers);
  +            StringTokenizer tok = new StringTokenizer(handlers, ",");
               while (tok.hasMoreTokens()) {
  -                String handlerName = (tok.nextToken());
  +                String handlerName = (tok.nextToken().trim());
                   Handler handler = (Handler) info.handlers.get(handlerName);
                   if (handler != null) {
                       logger.addHandler(handler);
  @@ -283,9 +283,9 @@
                   String rootHandlers = info.props.getProperty(".handlers");
                   String handlers = info.props.getProperty("handlers");
                   if (handlers != null) {
  -                    StringTokenizer tok = new StringTokenizer(handlers);
  +                    StringTokenizer tok = new StringTokenizer(handlers, ",");
                       while (tok.hasMoreTokens()) {
  -                        String handlerName = (tok.nextToken());
  +                        String handlerName = (tok.nextToken().trim());
                           String handlerClassName = handlerName;
                           String prefix = "";
                           if (handlerClassName.length() <= 0) {
  
  
  
  1.3       +4 -2      jakarta-tomcat-connectors/juli/src/java/org/apache/juli/FileHandler.java
  
  Index: FileHandler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/juli/src/java/org/apache/juli/FileHandler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FileHandler.java	2 Mar 2005 21:40:00 -0000	1.2
  +++ FileHandler.java	3 Mar 2005 00:23:00 -0000	1.3
  @@ -297,8 +297,10 @@
           String value = LogManager.getLogManager().getProperty(name);
           if (value == null) {
               value = defaultValue;
  +        } else {
  +            value = value.trim();
           }
  -        return value.trim();
  +        return value;
       }
       
       
  
  
  

---------------------------------------------------------------------
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