openjfx-dev Digest, Vol 34, Issue 36

Kevin Rushforth kevin.rushforth at oracle.com
Mon Sep 22 15:34:27 UTC 2014


+1 on this suggestion.

-- Kevin


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
>
>
> On 22/09/14 05:30, openjfx-dev-request at openjdk.java.net wrote:
>> Message: 1
>> Date: Fri, 19 Sep 2014 16:38:27 +0200
>> From: Peter Levart<peter.levart at gmail.com>
>> To: Werner Lehmann<lehmann at media-interactive.de>,
>>     "openjfx-dev at openjdk.java.net"  <openjfx-dev at openjdk.java.net>
>> Subject: Re: How to suppress platform logger output
>> Message-ID:<541C3FE3.5060902 at gmail.com>
>> Content-Type: text/plain; charset=utf-8; format=flowed
>>
>> On 09/19/2014 01:34 PM, Werner Lehmann wrote:
>>> >Hi,
>>> >
>>> >I'd like to use one of the Bindings.select* methods but can't really
>>> >accept the tons of stderr output it generates for null steps.
>>> >According to this ticket...
>>> >
>>> >[#RT-35957] Bindings class spits out a lot of unneeded log messages
>>> >https://javafx-jira.kenai.com/browse/RT-35957
>>> >
>>> >... 8u20 resolves this by logging on the FINE level. But how can I
>>> >suppress this output then? As far as I know the platform logger logs
>>> >to stderr if JDK logging is not used - and we are on log4j. Which
>>> >means I get FINE logging on stderr which does not help much.
>> Can you use the platform logger API? Like the following:
>>
>>           sun.util.logging.PlatformLogger
>>               .getLogger("bla.bla")
>> .setLevel(sun.util.logging.PlatformLogger.Level.WARNING);
>>
>> Regards, Peter
>>
>>> >
>>> >Rgds
>>> >Werner
>>> >
>>>> >>Sep 19, 2014 1:33:32 PM
>>>> >>com.sun.javafx.binding.SelectBinding$SelectBindingHelper
>>>> >>getObservableValue
>>>> >>WARNING: Exception while evaluating select-binding [parent, value]
>>>> >>Sep 19, 2014 1:33:32 PM
>>>> >>com.sun.javafx.binding.SelectBinding$SelectBindingHelper
>>>> >>getObservableValue
>>>> >>INFO: Property 'value' in ReadOnlyObjectProperty [bean: TreeItem [
>>>> >>value: b ], name: parent, value: null] is null
>>>> >>java.lang.NullPointerException
>>>> >>     at
>>>> >>com.sun.javafx.binding.SelectBinding$SelectBindingHelper.getObservableValue(SelectBinding.java:481) 
>>>>
>>>> >>     at
>>>> >>com.sun.javafx.binding.SelectBinding$AsString.computeValue(SelectBinding.java:394) 
>>>>
>>>> >>     at 
>>>> javafx.beans.binding.StringBinding.get(StringBinding.java:152)
>>>> >>     at
>>>> >>mint.javafx.report.design.model.elements.MintJRTextField.main(MintJRTextField.java:182) 
>>>>
>>> >
>>>> >>//    TreeItem<String> t1 = new TreeItem<String>("a");
>>>> >>     TreeItem<String> t2 = new TreeItem<String>("b");
>>>> >>     TreeItem<String> t3 = new TreeItem<String>("c");
>>>> >>
>>>> >>//    t1.getChildren().add(t2);
>>>> >>     t2.getChildren().add(t3);
>>>> >>
>>>> >>     StringBinding binding = Bindings.selectString(t3, "parent",
>>>> >>"parent", "value");
>>>> >>     System.out.println(binding.get());
>>> >
>


More information about the openjfx-dev mailing list