Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B523B10EE7 for ; Mon, 3 Mar 2014 20:03:25 +0000 (UTC) Received: (qmail 71855 invoked by uid 500); 3 Mar 2014 20:03:08 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 71796 invoked by uid 500); 3 Mar 2014 20:03:05 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 71720 invoked by uid 99); 3 Mar 2014 20:03:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2014 20:03:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2014 20:02:56 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 279B62388A2C for ; Mon, 3 Mar 2014 20:02:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1573718 [2/2] - in /httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http: client/protocol/ conn/ssl/ impl/auth/ impl/client/ impl/conn/ impl/execchain/ impl/io/ Date: Mon, 03 Mar 2014 20:02:32 -0000 To: commits@hc.apache.org From: olegk@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140303200235.279B62388A2C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RedirectExec.java URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RedirectExec.java?rev=1573718&r1=1573717&r2=1573718&view=diff ============================================================================== --- httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RedirectExec.java (original) +++ httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RedirectExec.java Mon Mar 3 20:02:31 2014 @@ -31,8 +31,8 @@ import java.io.IOException; import java.net.URI; import java.util.List; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import android.util.Log; + import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.HttpException; import org.apache.http.HttpHost; @@ -67,7 +67,7 @@ import org.apache.http.util.EntityUtilsH @ThreadSafe public class RedirectExec implements ClientExecChain { - private final Log log = LogFactory.getLog(getClass()); + private final static String TAG = "HttpClient"; private final ClientExecChain requestExecutor; private final RedirectStrategy redirectStrategy; @@ -139,22 +139,22 @@ public class RedirectExec implements Cli if (!currentRoute.getTargetHost().equals(newTarget)) { final AuthStateHC4 targetAuthState = context.getTargetAuthState(); if (targetAuthState != null) { - this.log.debug("Resetting target auth state"); + Log.d(TAG, "Resetting target auth state"); targetAuthState.reset(); } final AuthStateHC4 proxyAuthState = context.getProxyAuthState(); if (proxyAuthState != null) { final AuthScheme authScheme = proxyAuthState.getAuthScheme(); if (authScheme != null && authScheme.isConnectionBased()) { - this.log.debug("Resetting proxy auth state"); + Log.d(TAG, "Resetting proxy auth state"); proxyAuthState.reset(); } } } currentRoute = this.routePlanner.determineRoute(newTarget, currentRequest, context); - if (this.log.isDebugEnabled()) { - this.log.debug("Redirecting to '" + uri + "' via " + currentRoute); + if (Log.isLoggable(TAG, Log.DEBUG)) { + Log.d(TAG, "Redirecting to '" + uri + "' via " + currentRoute); } EntityUtilsHC4.consume(response.getEntity()); response.close(); @@ -173,7 +173,7 @@ public class RedirectExec implements Cli try { EntityUtilsHC4.consume(response.getEntity()); } catch (final IOException ioex) { - this.log.debug("I/O error while releasing connection", ioex); + Log.d(TAG, "I/O error while releasing connection", ioex); } finally { response.close(); } Modified: httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RetryExec.java URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RetryExec.java?rev=1573718&r1=1573717&r2=1573718&view=diff ============================================================================== --- httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RetryExec.java (original) +++ httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/RetryExec.java Mon Mar 3 20:02:31 2014 @@ -29,8 +29,8 @@ package org.apache.http.impl.execchain; import java.io.IOException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import android.util.Log; + import org.apache.http.Header; import org.apache.http.HttpException; import org.apache.http.NoHttpResponseException; @@ -58,7 +58,7 @@ import org.apache.http.util.Args; @Immutable public class RetryExec implements ClientExecChain { - private final Log log = LogFactory.getLog(getClass()); + private final static String TAG = "HttpClient"; private final ClientExecChain requestExecutor; private final HttpRequestRetryHandler retryHandler; @@ -86,29 +86,29 @@ public class RetryExec implements Client return this.requestExecutor.execute(route, request, context, execAware); } catch (final IOException ex) { if (execAware != null && execAware.isAborted()) { - this.log.debug("Request has been aborted"); + Log.d(TAG, "Request has been aborted"); throw ex; } if (retryHandler.retryRequest(ex, execCount, context)) { - if (this.log.isInfoEnabled()) { - this.log.info("I/O exception ("+ ex.getClass().getName() + + if (Log.isLoggable(TAG, Log.INFO)) { + Log.i(TAG, "I/O exception ("+ ex.getClass().getName() + ") caught when processing request to " + route + ": " + ex.getMessage()); } - if (this.log.isDebugEnabled()) { - this.log.debug(ex.getMessage(), ex); + if (Log.isLoggable(TAG, Log.DEBUG)) { + Log.d(TAG, ex.getMessage(), ex); } if (!Proxies.isRepeatable(request)) { - this.log.debug("Cannot retry non-repeatable request"); + Log.d(TAG, "Cannot retry non-repeatable request"); final NonRepeatableRequestException nreex = new NonRepeatableRequestException( "Cannot retry request with a non-repeatable request entity"); nreex.initCause(ex); } request.setHeaders(origheaders); - if (this.log.isInfoEnabled()) { - this.log.info("Retrying request to " + route); + if (Log.isLoggable(TAG, Log.INFO)) { + Log.i(TAG, "Retrying request to " + route); } } else { if (ex instanceof NoHttpResponseException) { Modified: httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java?rev=1573718&r1=1573717&r2=1573718&view=diff ============================================================================== --- httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java (original) +++ httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/execchain/ServiceUnavailableRetryExec.java Mon Mar 3 20:02:31 2014 @@ -30,8 +30,8 @@ package org.apache.http.impl.execchain; import java.io.IOException; import java.io.InterruptedIOException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; +import android.util.Log; + import org.apache.http.Header; import org.apache.http.HttpException; import org.apache.http.annotation.Immutable; @@ -57,7 +57,7 @@ import org.apache.http.util.Args; @Immutable public class ServiceUnavailableRetryExec implements ClientExecChain { - private final Log log = LogFactory.getLog(getClass()); + private final static String TAG = "HttpClient"; private final ClientExecChain requestExecutor; private final ServiceUnavailableRetryStrategy retryStrategy; @@ -87,7 +87,7 @@ public class ServiceUnavailableRetryExec final long nextInterval = this.retryStrategy.getRetryInterval(); if (nextInterval > 0) { try { - this.log.trace("Wait for " + nextInterval); + Log.d(TAG, "Wait for " + nextInterval); Thread.sleep(nextInterval); } catch (final InterruptedException e) { Thread.currentThread().interrupt(); Modified: httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/AbstractMessageParserHC4.java URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/AbstractMessageParserHC4.java?rev=1573718&r1=1573717&r2=1573718&view=diff ============================================================================== --- httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/AbstractMessageParserHC4.java (original) +++ httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/AbstractMessageParserHC4.java Mon Mar 3 20:02:31 2014 @@ -76,7 +76,7 @@ public abstract class AbstractMessagePar * @param parser the line parser. * @param params HTTP parameters. * - * @deprecated (4.3) use {@link AbstractMessageParserHC4#AbstractMessageParser(SessionInputBuffer, + * @deprecated (4.3) use {@link AbstractMessageParserHC4#AbstractMessageParserHC4(SessionInputBuffer, * LineParser, MessageConstraints)} */ @Deprecated Modified: httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/ChunkedOutputStreamHC4.java URL: http://svn.apache.org/viewvc/httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/ChunkedOutputStreamHC4.java?rev=1573718&r1=1573717&r2=1573718&view=diff ============================================================================== --- httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/ChunkedOutputStreamHC4.java (original) +++ httpcomponents/httpclient-android/branches/4.3.3-android/src/main/java/org/apache/http/impl/io/ChunkedOutputStreamHC4.java Mon Mar 3 20:02:31 2014 @@ -67,7 +67,7 @@ public class ChunkedOutputStreamHC4 exte * @param bufferSize The minimum chunk size (excluding last chunk) * @throws IOException not thrown * - * @deprecated (4.3) use {@link ChunkedOutputStreamHC4#ChunkedOutputStream(int, SessionOutputBuffer)} + * @deprecated (4.3) use {@link ChunkedOutputStreamHC4#ChunkedOutputStreamHC4(int, SessionOutputBuffer)} */ @Deprecated public ChunkedOutputStreamHC4(final SessionOutputBuffer out, final int bufferSize) @@ -82,7 +82,7 @@ public class ChunkedOutputStreamHC4 exte * @param out the output buffer to wrap * @throws IOException not thrown * - * @deprecated (4.3) use {@link ChunkedOutputStreamHC4#ChunkedOutputStream(int, SessionOutputBuffer)} + * @deprecated (4.3) use {@link ChunkedOutputStreamHC4#ChunkedOutputStreamHC4(int, SessionOutputBuffer)} */ @Deprecated public ChunkedOutputStreamHC4(final SessionOutputBuffer out)