Android API for sending log output, which can be viewed and filtered by logcat.
Questions tagged [android-log]
78 questions
446
votes
31 answers
How to remove all debug logging calls before building the release version of an Android app?
According to Google, I must "deactivate any calls to Log methods in the source code" before publishing my Android app to Google Play. Extract from section 3 of the publication checklist:
Make sure you deactivate logging and disable the debugging…

Nicolas Raoul
- 58,567
- 58
- 222
- 373
46
votes
8 answers
The logging tag can be at most 23 characters
Since update AS 1.1 Preview 2, I'm getting red lines under all my Log messages
Log.d(TAG, "message");
With message: "The logging tag can be at most 23 characters..".
I didn't update anything fundamentally, except Android Studio itself. Is this a…

TomCB
- 3,983
- 9
- 40
- 66
36
votes
9 answers
BuildConfig.DEBUG always return false
Why does BuildConfig.DEBUG return false, when I run the application?
I use it to control the log like the following:
public static void d(String LOG_TAG, String msg){
if(BuildConfig.DEBUG){
Log.d(LOG_TAG,msg);
}
}

cocoa
- 378
- 1
- 3
- 8
25
votes
1 answer
What is com.google.android.gm?
One of my logs is returning the following message:
12-07 10:42:45.201 6622-17013/? D/DownloadManager: 23 Starting {Apk-apks_1.1.017-812_releaseVersion.apk} by {10112:com.google.android.gm}
I believe com.google.android.gm represents my gmail account…

Red M
- 2,609
- 3
- 30
- 50
21
votes
4 answers
Should I comment my log calls when creating my final package?
I have an application that uses a lot of Log.d() or Log.e() calls for debugging. Now I want to create my final package for release. The Android Export feature from Eclipse mentions to remove the "Debuggable" flag in the manifest, which I have done.…

jmbouffard
- 1,581
- 1
- 15
- 22
17
votes
3 answers
Why Android TimingLogger is not able to print logs?
I am trying to use TimingLogger for checking time consumed for a particular method and its statements. But Android TimingLogger is not able to print logs.

ASHOK KUMAR
- 811
- 6
- 14
11
votes
2 answers
How to capture Modem Radio Log in Android
I need to capture some information from Modem Radio Log in android. I want to do this because I need some information about baseband in android, and I found out that to do that I must capture modem log.
I found Read logcat programmatically within…

Mustafa Mohammadi
- 1,433
- 1
- 12
- 25
10
votes
3 answers
Tag is null when using Timber
When the DebugTree logs, I see the class name, however when I create a custom Tree, the tag is null. Here what my custom tree looks like:
public class CrashlyticsTree extends Timber.Tree {
private static final String CRASHLYTICS_KEY_PRIORITY =…

Sree
- 2,727
- 3
- 29
- 47
10
votes
1 answer
Android Studio doesn't display logs by package name
After running a project in log is added filter such as "app: My_Package_Name"
in /.idea/workspace.xml added:
…

NickUnuchek
- 11,794
- 12
- 98
- 138
10
votes
4 answers
Logback-android: Log not getting writen to a file
Trying to redirect the log messages using logback-android, so that messages can be saved in a file. However, it is not getting saved into a file.
This is my logback.xml file configration, which is stored under src/main/assets in my Android…

Shiv
- 689
- 8
- 23
6
votes
1 answer
Android library *.aar does not log to logcat?
I wrote a simple library, which I use in my main Android Studio project. I imported that *.aar library to my main project and I can instatiate objects from that library or call methods from there.
I also have log outputs like: Log.d(TAG, "Lala");…

Ralf Wickum
- 2,850
- 9
- 55
- 103
6
votes
1 answer
How to get logs of other apps?
I want to read logs from other apps and filter them so when a certain keyword is being logged, my application will perform a certain task.
I found several methods of reading logs, but from my testing I could only get my application logs.
This is the…

Rosenpin
- 862
- 2
- 11
- 40
5
votes
3 answers
What is the meaning of "wtf" in the Android Volley?
I encountered the method
public static void wtf(String format, Object... args) {
Log.wtf(TAG, buildMessage(format, args));
}
public static int wtf(String tag, String msg, Throwable tr) {
throw new RuntimeException("Stub!");
…

Sanjeet A
- 5,171
- 3
- 23
- 40
4
votes
2 answers
How to print log in compose
I want to print some logs for debug reason, it seems the print and Timber are all not work with compose, what's the alternative choice?

ccd
- 5,788
- 10
- 46
- 96
4
votes
2 answers
How can I monitor android.util.log or override it?
I'm using log.d/v/w/e everywhere in the project.
Now, I want to save all the logs to the device local file.
However, the android.util.Log class in the final class.
That means I can't extend from it.
Is there a way to take over control for…

CodingTT
- 1,125
- 3
- 14
- 23