dev@glassfish.java.net

Re: Changing Stdout/Stderr loggers

From: Carla Mott <Carla.Mott_at_Sun.COM>
Date: Thu, 19 Nov 2009 12:13:16 -0800

Hi Scott,

I was able to change what we are doing for standard out/err to use a
logger javax.enterprise.system.std so that we can better control output.
  By default message that are sent to stdout are logged with a level of
INFO and message sent to stderr are logged with level SEVERE.

you can add the following to logging.properties file to set the logger
level to WARNING:

javax.enterprise.system.std.level=WARNING


Carla


Scott Oaks wrote:
> In v3, the standard out/err loggers now appear to be anonymous loggers,
> which means that we cannot control their output directly. The
> logging.properties can have something like
> .level=OFF
> so that the anonymous loggers inherit that default setting, but that
> affects other loggers not defined in the logging.properties file.
>
> Is this really the intended behavior, or am I missing something? We
> often see developers write noisy applications that use
> System.out.println or printStackTrace() and need turn off those messages
> during production. Yes, they should use a logger, but they don't always
> do so, and previously we've always just adjusted the system.out/err
> logging properties.
>
> -Scott
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>