/// <summary> /// ���������ɵ���Ϣ�������ԣ� /// </summary> private void LogSlowRequests(long requestLifetime, Request request, byte[] responseContents, HttpStatusCode statusCode) { if (DEBUG || requestLifetime > SLOW_REQUEST_THRESHOLD_MS) { VolleyLog.D("HTTP response for request=<{0}> [lifetime={1}],[size={2}], [rc={3}],[retryCount={4}]", requestLifetime, requestLifetime, responseContents != null ? responseContents.Length.ToString() : "null", statusCode, request.GetRetryPolicy().CurrentRetryCount); } }
private static void AttempRetryOnException(String logPrefix, Request request, VolleyError exception) { IRetryPolicy retryPolicy = request.GetRetryPolicy(); int oldTimeout = request.GetTimeoutMs(); try { retryPolicy.Retry(exception); } catch (VolleyError e) { request.AddMarker(String.Format("{0}-timeout-giveup[timeout={1}]", logPrefix, oldTimeout)); throw e; } request.AddMarker(String.Format("{0}-retry [timeout-{1}]", logPrefix, oldTimeout)); }