Questions tagged [logcat]

Logcat is the command to view and filter information from the Android logging system, but more often the name is used as a synonym for the Android logging system itself.

Logcat is the command to view and filter information from the Android logging system, but more often the name is used as a synonym for the Android logging system itself.

Logging information from Logcat is vital for diagnosing problems and debugging Android apps.

To retrieve information from logcat manually the Android Debug Bridge (ADB) command line tool is used. Alternatively Eclipse with Android Development Tools (ADT) plug-in provides a logcat view in most perspectives, automatically retrieving logging information.

Detailed information on the logcat command is available at the Android Developers documentation.

2313 questions
469
votes
38 answers

Filter LogCat to get only the messages from My Application in Android?

I observed that when i use Logcat with Eclipse with ADT for Android, I get messages from many other applications as well. Is there a way to filter this and show only messages from my own application only.
Vinod
  • 31,933
  • 35
  • 96
  • 119
391
votes
7 answers

Android Log.v(), Log.d(), Log.i(), Log.w(), Log.e() - When to use each one?

The different LogCat methods are: Log.v(); // Verbose Log.d(); // Debug Log.i(); // Info Log.w(); // Warning Log.e(); // Error What are the appropriate situations to use each type of Logging? I know that perhaps it's just a little bit of semantics…
Jake Wilson
  • 88,616
  • 93
  • 252
  • 370
362
votes
69 answers

Android studio logcat nothing to show

I installed Android Studio yesterday, and I tried to use the LogCat to see the logs. But there is nothing to show in the logcat. I used the terminal to run ./adb logcat and it works. Is there someone who can explain to me how to use logcat in…
user2506173
  • 3,959
  • 3
  • 16
  • 9
249
votes
29 answers

Why doesn't logcat show anything in my Android?

Why doesn't logcat show anything in my Android (while developing apps with Eclipse)? It just doesn't print anything. It's empty.
TIMEX
  • 259,804
  • 351
  • 777
  • 1,080
209
votes
14 answers

Android Studio, logcat cleans after app closes

I'm having a problem with my logcat since update 1.2 Beta for Android Studio. When I run my app it logs everything like it normally did, then I get at the point where my app crashes with the app saying: unfortunately, Game has stopped. After a few…
Black Lotus
  • 2,377
  • 3
  • 14
  • 18
193
votes
26 answers

Restore LogCat window within Android Studio

I have recently started to use Android Studio v0.1.1, And i can't seem to find LogCat... Is it gone? Or if not, how can I enable it? If it is gone, is there any way to enable something similar to log my app behavior (and mainly crashes)?
rel-s
  • 6,108
  • 11
  • 38
  • 50
178
votes
9 answers

Huawei, logcat not showing the log for my app?

OK, logcat is showing system logs but it is not showing application log on my Huawei Ascend. If I switch to another device such as my Galaxy Nexus or Nexus 7 then for the same app (same APK even) log is displayed. The Huawei Ascend is running…
William
  • 20,150
  • 8
  • 49
  • 91
170
votes
4 answers

How to empty (clear) the logcat buffer in Android

How can I empty (clear) the logcat buffer in Android? I use adb logcat from command line and pipe the output to a file, since the DDMS has a very limited buffer. At the moment, when I restart my app (after fixing bugs etc) the logcat buffer has data…
kaskelotti
  • 4,709
  • 9
  • 45
  • 72
169
votes
5 answers

Filter output in logcat by tagname

I'm trying to filter logcat output from a real device (not an emulator) by tag name but I get all the messages which is quite a spam. I just want to read messages from browser which should be something like "browser:" or "webkit:" , but it doesn't…
munch
  • 2,061
  • 2
  • 16
  • 23
160
votes
8 answers

How do I write outputs to the Log in Android?

I want to write some debugging output to the log to review it with logcat. If I write something to System.out this is already displayed in logcat. What is the clean way to write to the log and add levels and tags to my output?
Janusz
  • 187,060
  • 113
  • 301
  • 369
146
votes
14 answers

getExtractedText on inactive InputConnection warning on android

I get the following warning in my logcat. getExtractedText on inactive InputConnection I'm unable to find the reason behind it. Please help
pankajagarwal
  • 13,462
  • 14
  • 54
  • 65
143
votes
8 answers

Read logcat programmatically within application

I want to read and react to logcat logs within my application. I found the following code: try { Process process = Runtime.getRuntime().exec("logcat -d"); BufferedReader bufferedReader = new BufferedReader( new…
David
  • 37,109
  • 32
  • 120
  • 141
132
votes
12 answers

How to exclude certain messages by TAG name using Android adb logcat?

Logcat allows filtering logs but it works like that: You define filters and logcat only displays messages which matches filters. But is there a way to display all logs EXCEPT some TAGs defined by filters?
Kostas
  • 2,434
  • 3
  • 19
  • 18
131
votes
9 answers

Need to handle uncaught exception and send log file

When my app creates an unhandled exception, rather than simply terminating, I'd like to first give the user an opportunity to send a log file. I realize that doing more work after getting a random exception is risky but, hey, the worst is the app…
Peri Hartman
  • 19,314
  • 18
  • 55
  • 101
125
votes
27 answers

How to filter Android logcat by application?

How can I filter Android logcat output by application? I need this because when I attach a device, I can't find the output I want due to spam from other processes.
Alexey Zakharov
  • 24,694
  • 42
  • 126
  • 197
1
2 3
99 100