android-studio - Android Studio 3.1 Logcat 前缀并不总是显示和破坏漂亮的记录器

标签 android-studio logcat android-studio-3.1

由于新版本的 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: ╚═══════════════════════════════════════════════════════════════════════════════════════

有没有办法解决这个问题?

最佳答案

根据问题跟踪器 ( https://issuetracker.google.com/issues/77305804 ) 已修复并计划用于 Android Studio 3.2。引用问题跟踪器:

This change in behavior was inadvertent and I reverted it. The fix will go out in 3.2.



它没有说这个版本什么时候发布。但我会尽快更新我的答案。

编辑

Android Studio 3.2 发布了,我漂亮的记录器又开始工作了!

关于android-studio - Android Studio 3.1 Logcat 前缀并不总是显示和破坏漂亮的记录器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49535163/

相关文章:

android - 如何在 Android Studio 中使用断言

Android Studio 4.1.1-MacOS BigSur - 全屏卡住问题

java - 从 MainActivity 中的 onCreate() 启动另一个 Activity?

android - 如何在没有 Identity Toolkit API 的情况下使 Firebase 身份验证完全工作

java - 屏幕上的单选按钮中没有文字

java - Android: list 中无法识别 targetApi

java - 在Android Studio中添加Junit测试(从Eclipse导入的项目)

android - 找不到 com.facebook.katana.provider.AttributionIdProvider 的提供商信息

android - RecyclerView 日志语句 : W/RecyclerView: RecyclerView does not support scrolling to an absolute position. 改为使用 scrollToPosition

Android Studio 更新 3.1 开始出现 502 Gateway gradle dependencies error