Port fix for 40585. Fix parametrised constructor so parameters have an effect
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 8 Dec 2006 02:24:30 +0000 (02:24 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 8 Dec 2006 02:24:30 +0000 (02:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@483782 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/juli/FileHandler.java
webapps/docs/changelog.xml

index 2aff256..587440f 100644 (file)
@@ -47,16 +47,16 @@ public class FileHandler
 
     
     public FileHandler() {
-        configure();
-        open();
+        this(null, null, null);
     }
     
     
     public FileHandler(String directory, String prefix, String suffix) {
-        this();
         this.directory = directory;
         this.prefix = prefix;
         this.suffix = suffix;
+        configure();
+        open();
     }
     
 
@@ -189,15 +189,17 @@ public class FileHandler
         String tsString = ts.toString().substring(0, 19);
         date = tsString.substring(0, 10);
 
-        LogManager manager = LogManager.getLogManager();
         String className = FileHandler.class.getName();
         
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
         
         // Retrieve configuration of logging file name
-        directory = getProperty(className + ".directory", "logs");
-        prefix = getProperty(className + ".prefix", "juli.");
-        suffix = getProperty(className + ".suffix", ".log");
+        if (directory == null)
+            directory = getProperty(className + ".directory", "logs");
+        if (prefix == null)
+            prefix = getProperty(className + ".prefix", "juli.");
+        if (suffix == null)
+            suffix = getProperty(className + ".suffix", ".log");
 
         // Get logging level for the handler
         setLevel(Level.parse(getProperty(className + ".level", "" + Level.ALL)));
index 601f31c..14a2d11 100644 (file)
   </properties>
 
 <body>
+<section name="Tomcat 6.0.5 (remm)">
+  <subsection name="Catalina">
+    <changelog>
+      <fix>
+        <bug>40585</bug>: Fix parameterised constructor for o.a.juli.FileHandler
+        so parameters have an effect. (markt)
+      </fix>
+    </changelog>
+  </subsection>
+</section>
 <section name="Tomcat 6.0.4 (remm)">
   <subsection name="General">
     <changelog>