hello all,
i just committed the following patch but i am about to revert it.
apologies for any inconvenience which this may cause.
cheers;
rsn
Index: LogManager.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/logging/LogManager.java,v
retrieving revision 1.19
diff -u -r1.19 LogManager.java
--- LogManager.java 3 Apr 2006 08:59:53 -0000 1.19
+++ LogManager.java 28 May 2006 08:21:56 -0000
@@ -777,6 +777,22 @@
}
/**
+ * Returns the value of a configuration property as a String.
+ * <p>
+ * This function is a helper used by the Classpath implementation of
+ * java.util.logging, it is <em>not</em> specified in the logging API.
+ *
+ * @param name the name of the configuration property to fetch.
+ * @param defaultValue the value that will be returned if the property is not
+ * defined.
+ */
+ static String getStringProperty(String name, String defaultValue)
+ {
+ String result = getLogManager().getProperty(name);
+ return result == null ? defaultValue : result;
+ }
+
+ /**
* An instance of <code>LoggingPermission("control")</code>
* that is shared between calls to <code>checkAccess()</code>.
*/
Index: FileHandler.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/logging/FileHandler.java,v
retrieving revision 1.11
diff -u -r1.11 FileHandler.java
--- FileHandler.java 26 Feb 2006 04:01:01 -0000 1.11
+++ FileHandler.java 28 May 2006 08:23:16 -0000
@@ -192,6 +192,17 @@
extends StreamHandler
{
/**
+ * The name of the property to set for specifying a file naming (incl. path)
+ * pattern to use with rotating log files.
+ */
+ private static final String PATTERN_KEY = "java.util.logging.FileHandler.pattern";
+ /**
+ * The default pattern to use when the <code>PATTERN_KEY</code> property was
+ * not specified in the logging.properties file.
+ */
+ private static final String DEFAULT_PATTERN = "%h/java%u.log";
+
+ /**
* The number of bytes a log file is approximately allowed to reach
* before it is closed and the handler switches to the next file in
* the rotating set. A value of zero means that files can grow
@@ -252,8 +263,7 @@
public FileHandler()
throws IOException, SecurityException
{
- this(/* pattern: use configiguration */ null,
-
+ this(LogManager.getStringProperty(PATTERN_KEY, DEFAULT_PATTERN),
LogManager.getIntProperty("java.util.logging.FileHandler.limit",
/* default */ 0),