I have a HashMap<String, LinkedHashMap<String,String>
that is fairly long (not an issue) and I'm trying to make sure things look correct before I use the data inside it. To do this I'm trying to just attempting to do this Log.v("productsFromDB",products.toString())
but in the LogCat
It shows about 1/3 of it. Is there a way to output the entire map?
Add a comment
|
1 Answer
Logcat can only show about 4000 characters. So you need to call a recursive function to see the entire hashmap. Try this function:
public static void longLog(String str) {
if (str.length() > 4000) {
Log.d("", str.substring(0, 4000));
longLog(str.substring(4000));
} else
Log.d("", str);
}
-
how to remove " [ 12-09 12:34:09.886 27901:27901 V/ " all time?i want to see chunk of json but there are v and date .i want to get full chunk with out v and date.any way?– SumanDec 9, 2016 at 7:25
-
@Suman I dont think it can be done though I would like to be proved wrong Dec 9, 2016 at 10:40
-
,thanks for your reply.I want see whole log without time or type or any thing else.mean when i copy from log then some some time and type are added into string,– SumanDec 9, 2016 at 19:13