You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by "Eric A. Hicks" <lu...@tampabay.rr.com> on 2005/05/10 22:51:02 UTC

supress warnings

Is there a way to supress all the WARNING: and INFO: messages to the 
console?  Here's what I'm getting:

May 10, 2005 4:21:56 PM org.apache.commons.httpclient.HttpMethodBase 
readResponse
INFO: Discarding unexpected response: HTTP/1.1 100 Continue
May 10, 2005 4:21:57 PM org.apache.commons.httpclient.HttpMethodBase 
getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using 
getResponseAsStream instead is recommended.

These messages are slowing down my app... I am aware of the issues that 
are producing these messages, they are acceptable.  I just need to 
supress the messages.  Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: [HttpClient] supress warnings

Posted by Oleg Kalnichevski <ol...@apache.org>.
Eric,

Please take a look at the HttpClient logging guide:

http://jakarta.apache.org/commons/httpclient/3.0/logging.html

Hope this helps

Oleg

On Tue, 2005-05-10 at 17:06 -0400, Eric A. Hicks wrote:
> Sorry, I probably should have posted my code... here it is, it's 
> basically just the tutorial code from the home page.
> 
> public byte [] getHtmlPage(String url, int methodType) throws IOException {
>         byte [] htmlPage = null;
>         HttpClient httpclient = new HttpClient();
>         HttpMethod method;
>         if (methodType == 1) {
>             method = new GetMethod(url);
>         } else if (methodType == 2 ){
>             method = new PostMethod(url);
>         } else {
>             method = new GetMethod(url);
>         }
>         httpclient.executeMethod(method);
>         htmlPage = method.getResponseBody();
>         return htmlPage;
>     }
> 
> 
> Eric A. Hicks wrote:
> 
> > Is there a way to supress all the WARNING: and INFO: messages to the 
> > console?  Here's what I'm getting:
> >
> > May 10, 2005 4:21:56 PM org.apache.commons.httpclient.HttpMethodBase 
> > readResponse
> > INFO: Discarding unexpected response: HTTP/1.1 100 Continue
> > May 10, 2005 4:21:57 PM org.apache.commons.httpclient.HttpMethodBase 
> > getResponseBody
> > WARNING: Going to buffer response body of large or unknown size. Using 
> > getResponseAsStream instead is recommended.
> >
> > These messages are slowing down my app... I am aware of the issues 
> > that are producing these messages, they are acceptable.  I just need 
> > to supress the messages.  Thanks.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: [HttpClient] supress warnings

Posted by "Eric A. Hicks" <lu...@tampabay.rr.com>.
Sorry, I probably should have posted my code... here it is, it's 
basically just the tutorial code from the home page.

public byte [] getHtmlPage(String url, int methodType) throws IOException {
        byte [] htmlPage = null;
        HttpClient httpclient = new HttpClient();
        HttpMethod method;
        if (methodType == 1) {
            method = new GetMethod(url);
        } else if (methodType == 2 ){
            method = new PostMethod(url);
        } else {
            method = new GetMethod(url);
        }
        httpclient.executeMethod(method);
        htmlPage = method.getResponseBody();
        return htmlPage;
    }


Eric A. Hicks wrote:

> Is there a way to supress all the WARNING: and INFO: messages to the 
> console?  Here's what I'm getting:
>
> May 10, 2005 4:21:56 PM org.apache.commons.httpclient.HttpMethodBase 
> readResponse
> INFO: Discarding unexpected response: HTTP/1.1 100 Continue
> May 10, 2005 4:21:57 PM org.apache.commons.httpclient.HttpMethodBase 
> getResponseBody
> WARNING: Going to buffer response body of large or unknown size. Using 
> getResponseAsStream instead is recommended.
>
> These messages are slowing down my app... I am aware of the issues 
> that are producing these messages, they are acceptable.  I just need 
> to supress the messages.  Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org