<AWT Dev> logging to Java Console

Petr Pchelko petr.pchelko at oracle.com
Fri Mar 14 18:22:33 UTC 2014

Hello, Peter.

Simply writing to System.out or System.err without any logger doesn’t work?

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