openjfx-dev Digest, Vol 34, Issue 36
Werner Lehmann
lehmann at media-interactive.de
Mon Sep 22 10:36:49 UTC 2014
Hi Daniel,
actually, as it turns out that code did not even compile with javac 8u11:
> [mint.javac] [...] error: package sun.util.logging.PlatformLogger does not exist
> [mint.javac] com.sun.javafx.binding.Logging.getLogger().setLevel(sun.util.logging.PlatformLogger.Level.OFF);
Eclipse's JDT did not have a problem. Looks to me as if javac actively
"protects" that package. After exploring a few options to configure
logging in code only it looks as if the only way is to really do this
with a vm argument. Without WebStart it seems to be sufficient to use
System.setProperty first thing in the main method but with WebStart
there is no main method and it could be too late when doing it in
Application.start.
So, until 8u20 I am doing this:
in JNLP or vmarg with -D:
java.util.logging.config.file=logging.properties
logging.properties:
beans.level = OFF
Also, I am not sure if "java.util.logging.config.file" is a trusted
property for the jnlp file. I'll have to see about that.
Werner
On 22.09.2014 09:41, Daniel Fuchs wrote:
> Hi,
>
> I don't recommend using sun.* proprietary APIs.
> The safest way to suppress the logger output would be to
> switch it off in a logging.properties file.
>
> -Djava.util.logging.config.file=<logging.properties>
>
> and inside:
>
> <logger-name>.level = OFF
>
> best regards,
>
> -- daniel
More information about the openjfx-dev
mailing list