classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RFC: Jessie, enums, and loggers


From: Casey Marshall
Subject: RFC: Jessie, enums, and loggers
Date: Sat, 04 Jun 2005 12:02:36 -0700
User-agent: Mozilla Thunderbird 1.0.2 (Macintosh/20050317)

Hi,

I've started work on bringing Classpath's JSSE API (javax.net[.ssl]) up
to 1.5-level coverage, and the natural snag in doing this in mainline is
that it uses new language features -- two enums. It's easy enough to
write these two classes as pseudo-enums, but I was curious if there was
enough interest in making a PseudoEnum class that can be used by other
parts of the API. I'm not sure, but I think it should be possible to
make a mostly-binary-compatible enum class for pre-1.5 Java, but
wouldn't mind some advice if someone is more familiar with this.

I'm looking into making a patch for Classpath that merges Jessie. It is
not ready yet (IMO) to go in now, because it has direct dependencies on
GNU Crypto, which should be changed to only depend on the standard API.
Of course, if people are amenable to this, we could merge Jessie as-is
right now, and then do this work in Classpath CVS.

Lastly, I'd like to propose a standard mechanism for debug messages in
Classpath, using java.util.logging. The idea is to have
*component-level* logging, where log messages can be emitted not only by
the integer level (INFO, WARNING) but also on whether or not that exact
log level is enabled or not.

        - A global logger for Classpath, which all code should use for
          debug messages.
        - A subclass of Level that has integer level 'FINE', with
          specific component instances for components of Classpath,
          such as 'AWT', 'SECURITY', etc.
        - An implementation of Filter, with a static singleton, that
          maintains a Set of Classpath log levels -- which can be
          changed at run-time -- and only allows logging if a
          particular log level is in that set.

The idea here being that you can tune the filter to log a subset of
Classpath functionality (say, something like SECURITY|CRYPTO|JESSIE, if
I was debugging Jessie). This is, again, something I'm going to do
anyway in the context of Jessie, but wanted to know if there was general
interest in this.

Cheers,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]