diff options
author | Casey Marshall <csm@gnu.org> | 2006-06-28 23:04:18 +0000 |
---|---|---|
committer | Casey Marshall <csm@gnu.org> | 2006-06-28 23:04:18 +0000 |
commit | ec8b4cbbcc40c2f930b7b7b0f3fe6749bf45add7 (patch) | |
tree | caa4a895b6452d5f51e8cb21f783c2694688e9c1 | |
parent | 2be1f59cabb48fd8a8110263f5c9d2a771ed23f9 (diff) | |
download | classpath-ec8b4cbbcc40c2f930b7b7b0f3fe6749bf45add7.tar.gz |
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.
-rw-r--r-- | ChangeLog-ssl-nio | 9 | ||||
-rw-r--r-- | gnu/classpath/debug/SystemLogger.java | 29 |
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); } } |