package retrofit.android;

import android.util.Log;
import retrofit.RestAdapter;

/** A {@link RestAdapter.Log logger} for Android. */
public class AndroidLog implements RestAdapter.Log {
  private static final int LOG_CHUNK_SIZE = 4000;

  private final String tag;

  public AndroidLog(String tag) {
    this.tag = tag;
  }

  @Override public void log(String message) {
    for (int i = 0, len = message.length(); i < len; i += LOG_CHUNK_SIZE) {
      int end = Math.min(len, i + LOG_CHUNK_SIZE);
      logChunk(message.substring(i, end));
    }
  }

  public void logChunk(String chunk) {
    Log.d(getTag(), chunk);
  }

  public String getTag() {
    return tag;
  }
}

@@ -331,32 +331,38 @@
 Override public 
+final 
 void log(String 
@@ -549,24 +549,215 @@
 %0A    %7D%0A  %7D%0A%0A
+  /**%0A   * Called one or more times for each call to %7B@link #log(String)%7D. The length of %7B@code chunk%7D%0A   * will be no more than 4000 characters to support Android's %7B@link Log%7D class.%0A   */%0A
   public voi

Add documentation for AndroidLog.