summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog-ssl-nio9
-rw-r--r--gnu/classpath/debug/SystemLogger.java29
2 files changed, 32 insertions, 6 deletions
diff --git a/ChangeLog-ssl-nio b/ChangeLog-ssl-nio
index 96702f846..5be0763c8 100644
--- a/ChangeLog-ssl-nio
+++ b/ChangeLog-ssl-nio
@@ -1,5 +1,14 @@
2006-06-28 Casey Marshall <csm@gnu.org>
+ * gnu/classpath/debug/SystemLogger.java: extend Logger.
+ (SYSTEM): declare as instance of SystemLogger; set it to such an
+ instance.
+ (<clinit>): removed debug lines.
+ (<init>): new method.
+ (logv): new method.
+
+2006-06-28 Casey Marshall <csm@gnu.org>
+
* java/security/Signature.java (update): new method.
* java/security/SignatureSpi.java (engineUpdate): new method.
diff --git a/gnu/classpath/debug/SystemLogger.java b/gnu/classpath/debug/SystemLogger.java
index 94aa93f69..f341b5d9e 100644
--- a/gnu/classpath/debug/SystemLogger.java
+++ b/gnu/classpath/debug/SystemLogger.java
@@ -40,11 +40,12 @@ package gnu.classpath.debug;
import gnu.classpath.SystemProperties;
import java.util.StringTokenizer;
+import java.util.logging.Level;
import java.util.logging.Logger;
-public final class SystemLogger
+public final class SystemLogger extends Logger
{
- public static final Logger SYSTEM = Logger.getLogger ("gnu.classpath");
+ public static final SystemLogger SYSTEM = new SystemLogger();
static
{
@@ -60,12 +61,28 @@ public final class SystemLogger
Component c = Component.forName (tok.nextToken ());
if (c != null)
PreciseFilter.GLOBAL.enable (c);
- SYSTEM.log (java.util.logging.Level.INFO, "enabled: {0}", c);
+ SYSTEM.log (Level.INFO, "enabled: {0}", c);
}
}
+ }
- java.util.logging.Handler[] h = SYSTEM.getHandlers ();
- for (int i = 0; i < h.length; i++)
- System.out.println (h[i]);
+ /**
+ * Keep only one instance of the system logger.
+ */
+ private SystemLogger()
+ {
+ super("gnu.classpath", null);
+ }
+
+ /**
+ * Variable-arguments log method.
+ *
+ * @param level The level to log to.
+ * @param format The format string.
+ * @param args The arguments.
+ */
+ public void logv(Level level, String format, Object... args)
+ {
+ log(level, format, args);
}
}