Android Studio 3.0 Logcat continuously showing messages and does not stop
Asked Answered
P

4

9

When I start debugging my App in Android Studio 3.0 and open the Logcat, it displays so many messages and warnings, but the problem is, it never stops, even when the debugging is completed and the App is terminated, it still prints so many messages continuously. Can anybody help???

Paragraph answered 27/11, 2017 at 8:27 Comment(2)
Try to filter logcat to show only messages from your application: #19932487Burstone
If those logs are not coming from your app then I say it is normal.Pointer
T
18

Since you are not debugging or running any application on the device you have connected. Hence, the logcat is displaying the logs generated by all the apps in the device as well as the system logs. Which makes the log cat window go nuts.

What you can do is. On the top right corner of the log cat window, there is a filter config combo box. Select or create a filter of your own to filter out relevant logs. enter image description here

enter image description here

The filter could be created using any details, it could be a process ID (PID), the tag name e.g I/ActivityManager: where I stands for Info, V for Verbose, D for Debug and so on.

Traumatize answered 27/11, 2017 at 9:32 Comment(2)
I am just still amazed that one has to create a filter. The problem with creating a filter, you may miss some messages that you don't expect, such as exception from your app etc. Is it really hard, for google, to create a logging tool, that just shows me messages from my app, only my app by default. And then if I want some other garbage, i can go into settings and enable that? Because when logcat fills up now, sometimes it chokes, it doesn't show anything, or it takes really a long time to show results. smh.Inbreed
thanks it is really helpful to me. In Package Name, i pass my application package name after that it is showing application log onlyLouralourdes
F
1

You can add filter in your Logcat, and mention all the classes whose logs you want to discard.

In the field LogTag (shown in the pic) define a regex like this ^(?!Class A | Class B|#). Here Class A and Class B are the classes whose logs you don't want to see.That's it.log cat

Flibbertigibbet answered 27/11, 2017 at 8:39 Comment(3)
Like i've been saying, why is this really required. Can't google just create a tool that shows messages from my app without bothering with filters? Because this filter might miss some messages that i really want to see. Then you end up playing with filters here and there, which is really messy.Inbreed
Well right now there is no such tool, so we have to work with what we have at our disposable. And yes there is definitely a chance where you can miss some messages. But I use this to filter out those messages which are irrelevant and fill up the logcat like ConnectivityManager, DeviceThreaad etc. If you have a better way, do share it with us.Flibbertigibbet
I have realized that by selecting the debugging process does a good job. Not great, but good.Inbreed
U
1

If you see no debuggable application then change it to your app name. If that wont help change the log level to error. Last thing you can try is to filter the results. Good luck!

Utmost answered 27/11, 2017 at 8:40 Comment(0)
H
0

Simply in logcat filter section write lines as package:mine

Helping answered 5/3, 2023 at 12:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.