Android Studio 3.1 Logcat 前缀并不总是显示和破坏漂亮的记录器 [英] Android Studio 3.1 Logcat prefix not always showing and breaking pretty logger
问题描述
自新版 Android Studio (3.1) 起,Logcat 窗口并不总是显示前缀 (03-28 12:43:01.091 nl.test.app D/log
).我制作了自己的记录器,它以一种漂亮的方式打印,但是由于某些行不再具有相同的缩进,因此它被破坏了.我将在下面展示一个例子.
Since the new version of Android Studio (3.1) the Logcat window doesn't always show the prefix (03-28 12:43:01.091 nl.test.app D/log
). I made my own logger, which prints in a pretty way, but this gets broken since some lines are no longer with the same indentation. I'll show an example below.
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: ╚═══════════════════════════════════════════════════════════════════════════════════════
有什么办法可以解决这个问题吗?
Is there a way I can fix this?
推荐答案
根据问题跟踪器 (https://issuetracker.google.com/issues/77305804) 已修复并计划用于 Android Studio 3.2.引用问题跟踪器:
According to the issue tracker (https://issuetracker.google.com/issues/77305804) it is fixed and is planned for Android Studio 3.2. To quote from the issue tracker:
这种行为改变是无意的,我恢复了它.该修复将在 3.2 中推出.
This change in behavior was inadvertent and I reverted it. The fix will go out in 3.2.
没有说明这个版本什么时候发布.但我会尽快更新我的答案.
It does not say when this version will be released. But I'll update my answer as soon as I know.
编辑
Android Studio 3.2 发布,我的漂亮记录器又开始工作了!
Android Studio 3.2 is released and my pretty logger is working again!
这篇关于Android Studio 3.1 Logcat 前缀并不总是显示和破坏漂亮的记录器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!