Android Logcat:如何输出带有TAB字符的日志消息?

时间:2021-01-09 14:01:48

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

在Java中,System.out.printf(“\ t”)在控制台中提供了一个TAB字符。

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

我希望通过在我的日志消息中输出TAB字符,在Logcat DDMS中拥有该功能。

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.

但是,在Logcat中,我没有在A中看到TAB字符。

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

如果可能,我应该如何在Logcat中输出TAB字符?提前致谢。

EDIT:

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

可能我没有说清楚我的问题。我想在此显示TAB控制字符:

Android Logcat:如何输出带有TAB字符的日志消息?

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

我只是无法让TAB角色出现。提前致谢。

1 个解决方案

#1


1  

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.

如果没有人能够证明TAB字符可以输出到Logcat,那么我猜这意味着Logcat无法显示TAB字符。

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

我没有TAB字符的解决方法,也不希望继续解决此问题。

#1


1  

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.

如果没有人能够证明TAB字符可以输出到Logcat,那么我猜这意味着Logcat无法显示TAB字符。

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

我没有TAB字符的解决方法,也不希望继续解决此问题。