@@ -0,0 +1,1593 @@
+package com.onebit.logger;%0A%0Aimport android.os.Build;%0Aimport android.util.Log;%0A%0Aimport org.json.JSONArray;%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0A/**%0A * Created by scijoker on 08.10.15.%0A */%0Apublic class Logger %7B%0A%0A    public static void d(String tag, String arg) %7B%0A        Log.d(tag, arg);%0A    %7D%0A%0A    public static void dd(String tag, Object source) %7B%0A        if (isJSONValid(source)) %7B%0A            try %7B%0A                format(tag, new JSONObject(source.toString()).toString(2));%0A            %7D catch (JSONException e) %7B%0A                e.printStackTrace();%0A            %7D%0A        %7D else %7B%0A            format(tag, source);%0A        %7D%0A    %7D%0A%0A    private static void format(String tag, Object source) %7B%0A        tag = %22 %22 + tag + %22 %22;%0A        d(%22 %22, %22 %22);%0A        d(%22 %22, getSplitter(50) + tag + getSplitter(50));%0A        d(%22 %22, %22%22 + source);%0A        d(%22 %22, getSplitter(100 + tag.length()));%0A        d(%22 %22, %22 %22);%0A    %7D%0A%0A    private static String getSplitter(int length) %7B%0A        StringBuilder builder = new StringBuilder();%0A        for (int i = 0; i %3C length; i++) %7B%0A            builder.append(%22-%22);%0A        %7D%0A        return builder.toString();%0A    %7D%0A%0A    private static boolean isJSONValid(Object test) %7B%0A        try %7B%0A            new JSONObject(test.toString());%0A        %7D catch (JSONException ex) %7B%0A            try %7B%0A                if (Build.VERSION.SDK_INT %3E= Build.VERSION_CODES.KITKAT) %7B%0A                    new JSONArray(test);%0A                %7D%0A            %7D catch (JSONException ex1) %7B%0A                return false;%0A            %7D%0A        %7D%0A        return true;%0A    %7D%0A%7D%0A

Create Logger.java