Missing com.jme.util.LoggingSystem

I downloaded the latest version (rc1).

Some of my codes doesn't work any more.

It seems that the following is missing


It was removed in favour of using the JDK’s built in logging functionality.



http://java.sun.com/j2se/1.4.2/docs/guide/util/logging/overview.html

Gentleman Hal beat me to it :slight_smile:



It has been removed. Use java.util.Logger instead. The Method getAnonymousLogger() might already satisfy your needs.

Thanks for the info!

You guys are very helpful!    :slight_smile:

how can i set the logLevel and file output now?



    Handler fh = new FileHandler("/mnt/data/workspace/jmeOutput.log");
    java.util.logging.Logger.getAnonymousLogger().addHandler(fh);
    java.util.logging.Logger.getAnonymousLogger().setLevel(Level.FINEST);



with the code above, the logger still writes to the console and the file remains empty.

thanks,
Andy

you need to change the root logger - it can be obtained with

 Logger.getLogger("")

the most versatile way is to setup the logging to use a properties file of your choice. to use the one provided with jME you could do something like -Djava.util.logging.config.file=logging.properties as a vm argument…have a look at logging.properties(under the root jme dir) for samples on how to use it. If not specified, the logger uses the default logging.properties under your [java_home]/lib (and it's using a consolehandler only by default i think)



you can set the root level through code by Logger.getLogger("").setLevel as well. and get the handlers through it's getHandlers method, but that's more painful. plus, it's nice to be able to have different prop files for the same program, and not having to recompile when changing settings…

hey there!



thanks for your replies. ive tried both ways and it all works  8)



Andy

Any idea how to setup logging to a file from within a webstart application ??