You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by bu...@apache.org on 2005/07/14 09:52:41 UTC

DO NOT REPLY [Bug 35728] New: - getResponseBody always logs messages

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35728>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35728

           Summary: getResponseBody always logs messages
           Product: HttpClient
           Version: 3.0 RC3
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Commons HttpClient
        AssignedTo: httpclient-dev@jakarta.apache.org
        ReportedBy: incoming@jillesvangurp.com


Whenever I use getResponseBody or getResponseBodyAsString I get a warning in the
log that I shouldn't do this. Either deprecate these methods or accept that
there are valid usecases for using them and remove the warning. 

In my case I usually get the response to do stuff with it in memory. That
usually requires having either a bytearray or a string (i.e. it is a design
choice, I accept the memory overhead). I suppose that's why these methods are
part of the API (and I suspect they are used frequently). 

IMHO in general components like httpclient should always be silent and rely on
proper exception handling so that the user can decide whether to log exceptions,
errors, etc. It certainly shouldn't try to educate the programmer in through
logging messages.

Now I need to write code to avoid the log filling with useless warnings (my
customers hate noisy logs). I shouldn't have to that.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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