dev@glassfish.java.net

Re: jersey-client info is filling up my server.log

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 07 Jun 2010 09:11:26 +0200

Hi Anissa,

It is recommended not to create a new Client instance every time you
need to make a request. This object is expensive to create, so it is
best to create it once and reuse it. Then you will not get such
repeated logging output.

It should be possible to disable the logging using the JDK logging
configuration. If that does not work it might indicate a bug in JDK
logging.

You might be able to do the following and the client has been created:

        for (String l :
Collections.list(LogManager.getLogManager().getLoggerNames())) {
            if (l.startsWith("com.sun.jersey")) {
                Logger.getLogger(l).setLevel(Level.OFF);
            }
        }

Paul.

On Jun 4, 2010, at 10:57 PM, Anissa Lam wrote:

> Hi,
>
> We are using the jersey client as we are converting the GUI to use
> REST API. However, every click on the GUI will produce this log in
> server.log:
>
> [#|2010-06-04T13:54:18.239-0700|INFO|glassfish3.1|
> com.sun.jersey.api.client.Client|_ThreadID=33;_ThreadName=http-
> thread-pool-4848(2);|Adding the following classes declared in META-
> INF/services/jersey-client-components to the client configuration:
> class com.sun.jersey.multipart.impl.MultiPartConfigProvider
> class com.sun.jersey.multipart.impl.MultiPartReader
> class com.sun.jersey.multipart.impl.MultiPartWriter|#]
>
> my server.log file is huge now.
> How can i stop that ? I tried adding
> com.sun.jersey.api.client.Client=warn
>
> to config/logging.properties file, restart, but doesn't help.
>
> Any advice ?
>
> thanks
> Anissa
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>