Question

so it seems any time I attempt to write out text to logcat, if that text contains a \n in it, it cuts off the text at that point. This is rather annoying as I want to print out json response data which has newline characters in it and all it is displaying is the first line, which is {. I know there is more data in the response, as I can parse and index it.

Here is an example:

// This will only print Hello in logcat
__android_log_write(ANDROID_LOG_DEBUG, "MyGame", "Hello \n World");

Is there some setting in logcat or different method I need to use to print such data? I know I could break the data down, for every \n I could do a new log_write, but I'm hoping there is a better way.

Was it helpful?

Solution

the logcat does not print multiple lines only single lines so if you want the whole JSON response then it is better to put a breakpoint in and pull the response while you are running by looking at the variables

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top