3 回答
TA贡献1828条经验 获得超6个赞
if
Log.d()
Log.v()
release
-dontskipnonpubliclibraryclasses-dontobfuscate-forceprocessing-optimizationpasses 5-keep class * extends android.app.Activity-assumenosideeffects class android.util.Log { public static *** d(...); public static *** v(...);}
更新(4.5年后):
Log
Application
onCreate()
if (BuildConfig.DEBUG) { Timber.plant(new Timber.DebugTree());}
Timber.d("Downloading URL: %s", url);try { // ...} catch (IOException ioe) { Timber.e(ioe, "Bad things happened!");}
TA贡献1799条经验 获得超9个赞
class MyDebug { static final boolean LOG = true; }
if (MyDebug.LOG) { if (condition) Log.i(...); }
static final String TAG = "WindowManager";static final boolean DEBUG = false;static final boolean DEBUG_FOCUS = false;static final boolean DEBUG_ANIM = false;static final boolean DEBUG_LAYOUT = false;static final boolean DEBUG_RESIZE = false;static final boolean DEBUG_LAYERS = false;static final boolean DEBUG_INPUT = false;static final boolean DEBUG_INPUT_METHOD = false;static final boolean DEBUG_VISIBILITY = false;static final boolean DEBUG_WINDOW_MOVEMENT = false;static final boolean DEBUG_ORIENTATION = false;static final boolean DEBUG_APP_TRANSITIONS = false;static final boolean DEBUG_STARTING_WINDOW = false;static final boolean DEBUG_REORDER = false;static final boolean DEBUG_WALLPAPER = false;static final boolean SHOW_TRANSACTIONS = false;static final boolean HIDE_STACK_CRAWLS = true;static final boolean MEASURE_LATENCY = false;
if (DEBUG_FOCUS || DEBUG_WINDOW_MOVEMENT) Log.v( TAG, "Adding window " + window + " at " + (i+1) + " of " + mWindows.size() + " (after " + pos + ")");
- 3 回答
- 0 关注
- 647 浏览
添加回答
举报