Logging very long text in Eclipse Logcat.

Method to log very long string in eclipse logcat. Because logcat doesn’t show full text for very long string.

//
public static void longTextLogger(String tag, String str) {
    if(str.length() > 4000) {
    Log.i(tag,str.substring(0, 4000));
        longTextLogger(str.substring(4000));
    } else
    Log.i(tag,str);
}
//

2 thoughts on “Logging very long text in Eclipse Logcat.

Leave a Reply

Your email address will not be published. Required fields are marked *