简体   繁体   中英

Android Logcat: How do I output a log message with a TAB character?

In Java, System.out.printf("\\t") gives a TAB character in the Console.

I wanted to have that function in the Logcat DDMS, by outputting a TAB character in my log message.

public void testLogMessage(){
    Log.d("Test", "TAB: " + "\t" + "AAAAAAAA" + "\t" + "AAAAAAAAA");
}

However, in the Logcat, I do not see the TAB character in the A's.

If possible, how should I output the TAB character in the Logcat? Thanks in advance.

EDIT:

Probably I didn't make my question clear. I want to show up the TAB control character on this:

logcat的

I just could not get the TAB character to show up. Thanks in advance.

If no one is able to prove that TAB characters can be outputted to Logcat, then I guess it means Logcat isn't able to display TAB characters.

I do not have a workaround for the TAB characters, nor do I wish to continue fixing this problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM