<AWT Dev> logging to Java Console

Pete Brunet peter.brunet at oracle.com
Sat Mar 15 14:11:03 UTC 2014


It turns out that my code was running before the console was active. 
Creating/writing to a file worked.

On 3/14/14 1:48 PM, Petr Pchelko wrote:
>>> 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