0

Upon connecting my Android device (Redmi 6A, running Android 8.1) via USB debugging, LogCat displays all messages in a single line, instead of displaying each message in its own line:

LogCat screenshot

Any idea why this is happening and how to fix this?

(several posts I found in stackoverflow.com complain about the opposite, i.e. "how to join several lines", not what I am experiencing here)

WebViewer
  • 761
  • 7
  • 21
  • 1
    Have you checked if `adb logcat` gives you the same output? – WarrenFaith Dec 07 '22 at 11:56
  • 1
    Out of curiosity: why are you using eclipse? Wasn't the support for it discontinued ages ago? – WarrenFaith Dec 07 '22 at 11:57
  • 1
    @WarrenFaith Yes, `adb logcat` (on Windows CMD) displays each message in its own line. As for your 2nd question, I am trying to revive a 10+ years project of mine and I am doing this gradually (API 8 to 29) before moving to Android Studio. – WebViewer Dec 07 '22 at 11:58
  • 1
    I recommend to switch to Android Studio as the support for eclipse was dropped 6 years ago: https://android-developers.googleblog.com/2016/11/support-ended-for-eclipse-android.html (ok reviving an old project... understood, that will be a hassle) – WarrenFaith Dec 07 '22 at 12:01

2 Answers2

1

One of two things you can do:

  • use logcat from command line
  • run Android Studio in parallel to get the logcat output there
WarrenFaith
  • 57,492
  • 25
  • 134
  • 150
  • Thanks. Using [adb logcat](https://developer.android.com/studio/command-line/logcat) is more practical for me right now. However, no matter what I do, the command line version wouldn't filter my tags, despite following all tips related to shell variations. `adb logcat "ActivityManager:V *:S"` works, though. But I am interested in my own subclasses. – WebViewer Dec 07 '22 at 12:50
  • For now, I am getting away with `adb logcat | grep MyActivity`. Yes, by doing so I lose the useful coloring (`adb logcat -b all -v color -d`) but I guess I could live with that until I switch to Android Studio. – WebViewer Dec 07 '22 at 12:56
0

Actually, there is a solution that is better than the command line adb logcat (without having to install Android Studio): It is called "Android Device Monitor' and it is invoked by C:\adt-bundle-windows-x86_64\sdk\tools> monitor.bat:

screenshot of working GUI based LogCat

Credit goes to https://stackoverflow.com/a/19169081/2597758

WebViewer
  • 761
  • 7
  • 21