Ok, here's a quick test to see what JVMs support java.util.logging.  Take the 
included Java code, compile it,
and run it.  You'll also need to create a file "logging.properties" in your 
current directory and put the properties
listed below in it.  If your JVM is working correctly, you'll get something 
like:

Mar 5, 2003 4:59:48 AM LoggingTest main
SEVERE: Severe test from main

That comes from my machine running Sun's 1.4.1-b21 build.  The properties for 
logging.properties:

# define all of the handlers
handlers= java.util.logging.ConsoleHandler

# default logging level: info
.level= INFO

# define how the handlers work
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

# show anything FINE above from LoggingTest
LoggingTest.level=SEVERE

The actual Java code for LoggingTest:

import java.util.logging.LogManager;
import java.util.logging.Logger;
import java.util.logging.Level;

import java.io.FileInputStream;

public class LoggingTest {
  public static void main(String args[]) {
    try {
      LogManager.getLogManager().readConfiguration(new 
FileInputStream("logging.properties"));
    } catch (Throwable t) {
      t.printStackTrace();
    }
    Logger log = 
LogManager.getLogManager().getLogger("").getLogger(LoggingTest.class.getName());
    log.log(Level.SEVERE, "Severe test from main");
    log.log(Level.FINE, "Fine test from main");
    System.exit(0);
  }
}

Yes, I know all of that is piss poor code and there are better ways to use 
logging.  This is just a test to
see whether the different JVM implements the API.  If it does, we can map out a 
way that Freenet will
want to use the java.util.logging system that makes sense.

-jrandom

!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+
CryptoMail provides free end-to-end message encryption.  
http://www.cryptomail.org/   Ensure your right to privacy.
Traditional email messages are not secure.  They are sent as
clear-text and thus are readable by anyone with the motivation
to acquire a copy.
!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+!+


_______________________________________________
devl mailing list
devl at freenetproject.org
http://hawk.freenetproject.org:8080/cgi-bin/mailman/listinfo/devl

Reply via email to