No output from LogUtils
Closed this issue · 7 comments
Either LOGI
or LOGD
is not showing the output.
It seems like it's not working under while under different packages.
cc @indexer
Erh @sha92 , can you help me try this one ? Sample usage
LogUtils.LOGD("my_tag", "Helloooo");
Causing by BuildConfig.DEBUG
😿
It work in ADT but not in Android Studio
@HeinWinToe @indexer @sha92 It is related with Issue #52962 Gradle plugin does not propagate debug/release to dependencies .. So, current workaround would be just copying it to the project folder. I think it's safer to do so rather than removing the flag if (BuildConfig.DEBUG) {
we can get the Value in Build Config file its return False :) when i add New else statement in LogUtils class is work :D
@indexer 👍
@HeinWinToe the current fix by @indexer is like following
if (BuildConfig.DEBUG) {
Log.e(tag, "[" + c_name + "] " + message);
} else if (Log.isLoggable(tag, Log.DEBUG)) {
Log.e(tag, "[" + c_name + "] " + message);
} else {
Log.e(tag, "[" + c_name + "] " + message);
}
So, does it mean, even in the production (when the DEBUG
flag is off), the logs will be shown in the Logcat
?