<AWT Dev> logging to Java Console
Petr Pchelko
petr.pchelko at oracle.com
Fri Mar 14 18:48:44 UTC 2014
>> Simply writing to System.out or System.err without any logger doesn’t work?
> Hi Petr, I had tried System.out.println earlier and no luck with that,
> and now no luck with System.err.println (nor with the Logger). -Pete
That’s very strange. I’m always printing the debug info with println and it works well.
You could try setting all the “Debugging” checkboxes in the Java Control Panel -> Advanced.
With best regards. Petr.
14 марта 2014 г., в 10:45 после полудня, Pete Brunet <peter.brunet at oracle.com> написал(а):
>
> On 3/14/14 1:22 PM, Petr Pchelko wrote:
>> Hello, Peter.
>>
>> Simply writing to System.out or System.err without any logger doesn’t work?
> Hi Petr, I had tried System.out.println earlier and no luck with that,
> and now no luck with System.err.println (nor with the Logger). -Pete
>>
>> With best regards. Petr.
>>
>> 14 марта 2014 г., в 10:18 после полудня, Pete Brunet <peter.brunet at oracle.com> написал(а):
>>
>>> Hi I am debugging in an applet environment and woudl like to log ot the
>>> Java Console. I tried the following (from StackOverflow) with no luck:
>>>
>>> Logger log = Logger.getLogger("my.logger");
>>> log.setLevel(Level.ALL);
>>> ConsoleHandler handler = new ConsoleHandler();
>>> handler.setFormatter(new SimpleFormatter());
>>> handler.setLevel(Level.ALL);
>>> log.addHandler(handler);
>>> log.fine("my log message");
>>>
>>> What am I doing wrong?
>>>
>>> Pete
>
More information about the awt-dev
mailing list