Back to project page UniversalLoader.
The source code is released under:
Apache License
If you think the Android project UniversalLoader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.michaelflisar.universalloader.helper; //from w w w .ja v a 2 s. c o m import android.util.Log; import com.michaelflisar.universalloader.UniversalLoader; public class ULDebugger { public static enum DebugMode { SIMPLE, DETAILED } private static boolean mDebugEnabled = false; private static DebugMode mDebugMode = DebugMode.SIMPLE; public static void setDebugger(boolean enabled, DebugMode mode) { setDebug(enabled); setMode(mode); } protected static void setDebug(boolean enabled) { mDebugEnabled = enabled; } protected static void setMode(DebugMode mode) { mDebugMode = mode; } private static boolean isDebugRelevant(DebugMode mode) { if (mDebugEnabled && mode.ordinal() <= mDebugMode.ordinal()) return true; return false; } public static void debug(DebugMode mode, Class<?> source, String message) { if (isDebugRelevant(mode)) debug(source.getSimpleName() + ": " + message); } public static void debug(DebugMode mode, Object source, String message) { if (isDebugRelevant(mode)) debug(source.getClass().getSimpleName() + "@" + Integer.toHexString(source.hashCode()) + ": " + message); } private static void debug(String message) { Log.d(UniversalLoader.class.getSimpleName(), message); } }