package com.miguelgaeta.bootstrap.mg_log;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import lombok.Getter;
import timber.log.Timber;

/**
 * Created by mrkcsc on 3/15/15.
 */
@SuppressWarnings("UnusedDeclaration")
public class MGLog {

    @Getter
    private static MGLogConfig config = new MGLogConfig();

    /**
     * Callback info and error interfaces.
     */
    public interface Callback {

        void run(Throwable throwable, String message);

        interface Info extends Callback {

        }

        interface Error extends Callback {

        }
    }

    /**
     * Info level message.
     */
    public static void i(String message, Object... args) {
        Timber.i(message, args);
    }

    /**
     * Info level message with throwable.
     */
    public static void i(Throwable t, String message, Object... args) {
        Timber.i(t, message, args);
    }

    /**
     * Error level message.
     */
    public static void e(String message, Object... args) {
        Timber.e(message, args);
    }

    /**
     * Error level message with throwable.
     */
    public static void e(Throwable t, String message, Object... args) {
        Timber.e(t, message, args);
    }

    public static StackTraceElement[] getStackTrace(StackTraceElement[] stackTrace, String exclusionTag) {

        return getStackTrace(stackTrace, Collections.singletonList(exclusionTag));
    }

    public static StackTraceElement[] getStackTrace(StackTraceElement[] stackTrace, List<String> exclusionTags) {

        ArrayList<StackTraceElement> modifiedStackTrace = new ArrayList<>();

        for (StackTraceElement element : stackTrace) {

            boolean includeElement = true;

            for (String exclusionTag : exclusionTags) {

                if (element.getClassName().contains(exclusionTag)) {

                    includeElement = false;
                }
            }

            if (includeElement) {

                modifiedStackTrace.add(element);
            }
        }

        return modifiedStackTrace.toArray(new StackTraceElement[modifiedStackTrace.size()]);
    }
}

@@ -608,51 +608,8 @@
  %7D%0A%0A
-    /**%0A     * Info level message.%0A     */%0A
     
@@ -707,66 +707,8 @@
  %7D%0A%0A
-    /**%0A     * Info level message with throwable.%0A     */%0A
     
@@ -822,52 +822,8 @@
  %7D%0A%0A
-    /**%0A     * Error level message.%0A     */%0A
     
@@ -921,67 +921,8 @@
  %7D%0A%0A
-    /**%0A     * Error level message with throwable.%0A     */%0A
     
@@ -1024,32 +1024,246 @@
 , args);%0A    %7D%0A%0A
+    public static void v(String message, Object... args) %7B%0A        Timber.v(message, args);%0A    %7D%0A%0A    public static void v(Throwable t, String message, Object... args) %7B%0A        Timber.v(t, message, args);%0A    %7D%0A%0A
     public stati

Add verbose level.