From 5b6871ce1a2bd0d898354433c8c51dab91c34a8a Mon Sep 17 00:00:00 2001 From: markt Date: Fri, 8 Dec 2006 02:24:30 +0000 Subject: [PATCH] Port fix for 40585. Fix parametrised constructor so parameters have an effect 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 | 16 +++++++++------- webapps/docs/changelog.xml | 10 ++++++++++ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/java/org/apache/juli/FileHandler.java b/java/org/apache/juli/FileHandler.java index 2aff256d6..587440fa7 100644 --- a/java/org/apache/juli/FileHandler.java +++ b/java/org/apache/juli/FileHandler.java @@ -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))); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 601f31c51..14a2d11f1 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -14,6 +14,16 @@ +
+ + + + 40585: Fix parameterised constructor for o.a.juli.FileHandler + so parameters have an effect. (markt) + + + +
-- 2.11.0