tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject svn commit: r575617 - in /tomcat/tc6.0.x/trunk: java/org/apache/juli/ClassLoaderLogManager.java webapps/docs/changelog.xml
Date Fri, 14 Sep 2007 11:01:09 GMT
Author: pero
Date: Fri Sep 14 04:01:06 2007
New Revision: 575617

URL: http://svn.apache.org/viewvc?rev=575617&view=rev
Log:
 Handle more then one system property replacement at file logging.properties.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/juli/ClassLoaderLogManager.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/java/org/apache/juli/ClassLoaderLogManager.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/juli/ClassLoaderLogManager.java?rev=575617&r1=575616&r2=575617&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/juli/ClassLoaderLogManager.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/juli/ClassLoaderLogManager.java Fri Sep 14 04:01:06
2007
@@ -442,13 +442,19 @@
      */
     protected String replace(String str) {
         String result = str;
-        if (result.startsWith("${")) {
-            int pos = result.indexOf('}');
-            if (pos != -1) {
-                String propName = result.substring(2, pos);
+        int pos_start = result.indexOf("${");
+        if (pos_start != -1) {
+            int pos_end = result.indexOf('}');
+            if (pos_end != -1) {
+                String propName = result.substring(pos_start + 2, pos_end);
                 String replacement = System.getProperty(propName);
                 if (replacement != null) {
-                    result = replacement + result.substring(pos + 1);
+                    if(pos_start >0) {
+                        result = result.substring(0,pos_start) + 
+                            replacement + replace(result.substring(pos_end + 1));
+                    } else {                       
+                        result = replacement + replace(result.substring(pos_end + 1));
+                    }
                 }
             }
         }

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=575617&r1=575616&r2=575617&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Fri Sep 14 04:01:06 2007
@@ -82,6 +82,9 @@
       <update>
         Optimized JDBCAccessLogValve combined pattern request attribute access. (pero)
       </update>
+      <fix>
+        o.a.juli.ClassLoaderLogManager handle more then one system property replacement at
file logging.properties. (pero)
+      </fix>     
     </changelog>
   </subsection>
   <subsection name="Coyote">



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


Mime
View raw message