由于 Android Studio (3.1) 的新版本,Logcat 窗口并不总是显示前缀 ( 03-28 12:43:01.091 nl.test.app D/log
)。我制作了自己的记录器,它以一种漂亮的方式打印,但是由于某些行不再具有相同的缩进,所以它被破坏了。我将在下面展示一个示例。
03-28 12:43:01.091 nl.test.app D/log: ╔═══════════════════════════════════════════════════════════════════════════════════════
║ [ (TestActivity.kt:33)#OnCreate ]
║ This is my test log
03-28 12:43:01.092 nl.test.app D/log: ║ This is my second test log
╚═══════════════════════════════════════════════════════════════════════════════════════
以前是这样的:
03-28 12:43:01.091 nl.test.app D/log: ╔═══════════════════════════════════════════════════════════════════════════════════════
03-28 12:43:01.091 nl.test.app D/log: ║ [ (TestActivity.kt:33)#OnCreate ]
03-28 12:43:01.091 nl.test.app D/log: ║ This is my test log
03-28 12:43:01.092 nl.test.app D/log: ║ This is my second test log
03-28 12:43:01.092 nl.test.app D/log: ╚═══════════════════════════════════════════════════════════════════════════════════════
有没有办法解决这个问题?