Java tutorial
//package com.java2s; //License from project: Open Source License import android.util.Log; public class Main { /** * Method to trim log messages for debug * * @param TAG Tag for the message * @param message Message to log */ public static void d(String TAG, String message) { int maxLogSize = 1000; for (int index = 0; index <= message.length() / maxLogSize; index++) { int start = index * maxLogSize; int end = (index + 1) * maxLogSize; end = end > message.length() ? message.length() : end; Log.d(TAG, message.substring(start, end)); } } }