@@ -0,0 +1,1625 @@
+package com.darsh.couponstracker.logger;%0A%0Aimport android.util.Log;%0A%0Aimport com.darsh.couponstracker.BuildConfig;%0A%0A/**%0A * Created by darshan on 13/3/17.%0A */%0A%0Apublic class DebugLog %7B%0A    private static final boolean isDebugBuild = BuildConfig.DEBUG;%0A    private static boolean loggingEnabled = true;%0A%0A    private static final int requiredMethodIndex = 3;%0A%0A    private static boolean isLoggingEnabled() %7B%0A        return isDebugBuild && loggingEnabled;%0A    %7D%0A%0A    public static void setLoggingEnabled(boolean loggingEnabled) %7B%0A        DebugLog.loggingEnabled = loggingEnabled;%0A    %7D%0A%0A    public static void logMethod() %7B%0A        if (!isLoggingEnabled()) %7B%0A            return;%0A        %7D%0A        StackTraceElement%5B%5D stackTraceElements = Thread.currentThread().getStackTrace();%0A        String className = stackTraceElements%5BrequiredMethodIndex%5D.getClassName();%0A        String methodName = stackTraceElements%5BrequiredMethodIndex%5D.getMethodName();%0A        Log.i(getTag(className), methodName);%0A    %7D%0A%0A    public static void logMessage(String message) %7B%0A        if (!isLoggingEnabled()) %7B%0A            return;%0A        %7D%0A        StackTraceElement%5B%5D stackTraceElements = Thread.currentThread().getStackTrace();%0A        String className = stackTraceElements%5BrequiredMethodIndex%5D.getClassName();%0A        Log.i(getTag(className), message);%0A    %7D%0A%0A    private static String getTag(String className) %7B%0A        StringBuilder tag = new StringBuilder(%22DL-%22);%0A        for (char e : className.toCharArray()) %7B%0A            if (Character.isUpperCase(e)) %7B%0A                tag.append(e);%0A            %7D%0A        %7D%0A        return tag.toString();%0A    %7D%0A%7D%0A

Add custom debug logger