Android API for sending log output, which can be viewed and filtered by logcat.
Questions tagged [android-log]
78 questions
4
votes
1 answer
How to unit test Log.e in android?
I need to perform an unit test where I need to check if an error message is logged when a certain condition occurs in my app.
try {
//do something
} catch (ClassCastException | IndexOutOfBoundsException e) {
Log.e(INFOTAG,…

NewOne
- 401
- 5
- 19
4
votes
1 answer
How to edit template in Android Studio / JetBrains IntelliJ IDEA?
I wonder to add changed "loge" template in the Android Studio editor to remove the last required param - Exception object.
How "loge" template result looks now:
Before the dafualt template insert:
public void doSmth() {
//start write "loge" word…

Kirill Vashilo
- 1,559
- 1
- 18
- 27
3
votes
0 answers
" D/OpenGLRenderer: DecorView @4fea9e4 is drawn by HWUI ". repeats in Android Studio log
" D/OpenGLRenderer: DecorView @4fea9e4 is drawn by HWUI ".
The above line keeps repeating in Android Studio log. I have selected the app name and show only selected application option. I have googled for it, but found no references to such a log.…

Issac Peter
- 144
- 10
3
votes
1 answer
App got crash sometimes when opening my app
suddenly when opening my app i got one crash and i uploaded the crash log below.But it happens sometime only not every time and every device.
Can anyone help me to understand the crash log and why its happening for sometimes and some devices. what…

user3546693
- 364
- 3
- 18
3
votes
2 answers
How to get log just for last 5 minutes from command line
How to get log for recent time, for example, for last 5 minutes?
This command in command line
adb logcat -v time | find "E/"
gives error logs for all time.
(It's not interesting to wait several minutes while all logs is displaying)
Thank you very…

Kiryl Ivanou
- 1,015
- 2
- 12
- 22
3
votes
0 answers
Disable jni logging on Android production version
I created a logger.h file and I include and use it on my c++ code:
#ifndef LOG_TAG
#define LOG_TAG "jni"
#include
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,LOG_TAG,__VA_ARGS__)
#define LOGD(...) …

Asaf Pinhassi
- 15,177
- 12
- 106
- 130
3
votes
2 answers
How to find filter Logcat configuration in Android Studio 1.0?
I know how to do the actual logcat filtering but I can't find the icon for it. This is a view of the Logcat demonstration that I am following.
I saw that this is the standard view for Logcat - How to filter logcat in Android Studio?.
However this…

committedandroider
- 8,711
- 14
- 71
- 126
2
votes
2 answers
Android: a library to write log on file?
I have to write log on file and send it to the server every each app restart, or when the number of log file is enough.
After internet research: I have found Timber and java.util.logging.Logger.
I think to create a custom Timber tree and to use…

aeroxr1
- 1,014
- 1
- 14
- 36
2
votes
0 answers
Trying to understand which Log methods are omitted when releasing a debug and official release app?
Inside Log explanation in android site i couldn't understand the following sentence:
You should never compile verbose logs into your app, except during development. Debug logs are compiled in but stripped at runtime, while error, warning, and info…

Eitanos30
- 1,331
- 11
- 19
2
votes
1 answer
Is it possible to read the Slog in android monitor?
In the android source code i see often line like Slog.v(WindowManagerService.TAG, "First window added to " + this + ", creating SurfaceSession"); How can i see those Slog under android monitor ? And what the difference between Slog and Log?

zeus
- 12,173
- 9
- 63
- 184
2
votes
2 answers
Logcat no longer accepts empty tags
I couldn't figure out why my Logs weren't printing to the Logcat, until I added a tag. I'm lazy when it comes to logging and never added tags in the past. It's been a while since I've done android work, so I'm not sure how long its been this way.…

bwoogie
- 4,339
- 12
- 39
- 72
2
votes
1 answer
How to intercept the logs Log.d/w/e via Listener
After search a lot in the stackoverflow and via google about how to intercept the logs in my application. The solution that I found is executing the command logcat -v time in the runtime but this solution print all the logs and I just want to…

joselufo
- 3,393
- 3
- 23
- 37
2
votes
2 answers
Android app publishing checklist
The android app publishing checklist says that I need to delete all Log statements from my code. Does that mean I need to delete them or would just commenting them out do? I would need those Log statements for updation and maintenance purpose later…
user2197909
1
vote
0 answers
OkHttpInterceptor not logging to content to LogCat
I've set OkHttpInterceptor to the OkHttpClient as below:
OkHttpClient
private static OkHttpClient getOkHttpClient() {
OkHttpClient.Builder builder = new OkHttpClient.Builder();
builder.addInterceptor(getInterceptor());
…

Gokul Nath KP
- 15,485
- 24
- 88
- 126
1
vote
0 answers
Log.println-> priority parameter?
Context
println(int priority, String tag, String msg)
I'm wondering about the 'priority' parameter. It can take the following values: Log.VERBOSE, LOG.WARN etc. as defined in the Log class:
public static final int ASSERT = 7
public static final int…

kim
- 11
- 2