Permalink
Browse files

TFJ-647 ensure dump response body when prettyDebug is not set to true

  • Loading branch information...
yusuke committed Jan 1, 2012
1 parent 61d6ee7 commit aeb81a35d7f43c504a23d9b00772ee0d5f28560e
@@ -148,6 +148,9 @@ public JSONObject asJSONObject() throws TwitterException {
}
if (CONF.isPrettyDebugEnabled()) {
logger.debug(json.toString(1));
+ } else {
+ logger.debug(responseAsString != null ? responseAsString :
+ json.toString());
}
} catch (JSONException jsone) {
if (responseAsString == null) {
@@ -189,6 +192,9 @@ public JSONArray asJSONArray() throws TwitterException {
}
if (CONF.isPrettyDebugEnabled()) {
logger.debug(jsonArray.toString(1));
+ } else {
+ logger.debug(responseAsString != null ? responseAsString :
+ jsonArray.toString());
}
} catch (JSONException jsone) {
if (logger.isDebugEnabled()) {
@@ -1,2 +1,4 @@
oauth.consumerKey=7ZVgfKiOvBDcDFpytRWSA
oauth.consumerSecret=JmeJVeym78arzmGthrDUshQyhkq6nWA9tWLUKxc
+debug=true
+http.prettyDebug=true

0 comments on commit aeb81a3

Please sign in to comment.