// Path: app/src/main/java/com/jaeckel/etherwallet/util/DebugTree.java
// public class DebugTree extends Timber.Tree {
//     private static final int MAX_LOG_LENGTH = 4000;
//     private static final int CALL_STACK_INDEX = 5;
//     private static final Pattern ANONYMOUS_CLASS = Pattern.compile("(\\$\\d+)+$");
//     public static final int STACK_DEPTH = 7;
//     public static final int DOT_CLASS = 5;
// 
//     /**
//      * Break up {@code message} into maximum-length chunks (if needed) and send to either
//      * {@link Log#println(int, String, String) Log.println()} or
//      * {@link Log#wtf(String, String) Log.wtf()} for logging.
//      * <p/>
//      * {@inheritDoc}
//      */
//     @Override
//     @SuppressLint(value="LogNotTimber")
//     protected void log(int priority, String tag, String message, Throwable t) {
// 
//         Thread currentThread = Thread.currentThread();
//         final StackTraceElement trace = currentThread.getStackTrace()[STACK_DEPTH];
//         final String filename = trace.getFileName();
//         final String linkableSourcePosition = String.format(Locale.GERMAN, "(%s.java:%d)", filename.substring(0, filename.length() - DOT_CLASS), trace.getLineNumber());
//         final String logPrefix = String.format("[%s][%s.%s] ", currentThread.getName(), linkableSourcePosition, trace.getMethodName());
// 
//         message = logPrefix + message;
// 
//         if (message.length() < MAX_LOG_LENGTH) {
//             if (priority == Log.ASSERT) {
//                 Log.wtf(tag, message);
//             } else {
//                 Log.println(priority, tag, message);
//             }
//             return;
//         }
// 
//         // Split by line, then ensure each line can fit into Log's maximum length.
//         for (int i = 0, length = message.length(); i < length; i++) {
//             int newline = message.indexOf('\n', i);
//             newline = newline != -1 ? newline : length;
//             do {
//                 int end = Math.min(newline, i + MAX_LOG_LENGTH);
//                 String part = message.substring(i, end);
//                 if (priority == Log.ASSERT) {
//                     Log.wtf(tag, part);
//                 } else {
//                     Log.println(priority, tag, part);
//                 }
//                 i = end;
//             } while (i < newline);
//         }
//     }
// }


import android.app.Application;
import com.jaeckel.etherwallet.util.DebugTree;
import timber.log.Timber;
package com.jaeckel.etherwallet;




public class EtherApp extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
// Path: app/src/main/java/com/jaeckel/etherwallet/util/DebugTree.java
// public class DebugTree extends Timber.Tree {
//     private static final int MAX_LOG_LENGTH = 4000;
//     private static final int CALL_STACK_INDEX = 5;
//     private static final Pattern ANONYMOUS_CLASS = Pattern.compile("(\\$\\d+)+$");
//     public static final int STACK_DEPTH = 7;
//     public static final int DOT_CLASS = 5;
// 
//     /**
//      * Break up {@code message} into maximum-length chunks (if needed) and send to either
//      * {@link Log#println(int, String, String) Log.println()} or
//      * {@link Log#wtf(String, String) Log.wtf()} for logging.
//      * <p/>
//      * {@inheritDoc}
//      */
//     @Override
//     @SuppressLint(value="LogNotTimber")
//     protected void log(int priority, String tag, String message, Throwable t) {
// 
//         Thread currentThread = Thread.currentThread();
//         final StackTraceElement trace = currentThread.getStackTrace()[STACK_DEPTH];
//         final String filename = trace.getFileName();
//         final String linkableSourcePosition = String.format(Locale.GERMAN, "(%s.java:%d)", filename.substring(0, filename.length() - DOT_CLASS), trace.getLineNumber());
//         final String logPrefix = String.format("[%s][%s.%s] ", currentThread.getName(), linkableSourcePosition, trace.getMethodName());
// 
//         message = logPrefix + message;
// 
//         if (message.length() < MAX_LOG_LENGTH) {
//             if (priority == Log.ASSERT) {
//                 Log.wtf(tag, message);
//             } else {
//                 Log.println(priority, tag, message);
//             }
//             return;
//         }
// 
//         // Split by line, then ensure each line can fit into Log's maximum length.
//         for (int i = 0, length = message.length(); i < length; i++) {
//             int newline = message.indexOf('\n', i);
//             newline = newline != -1 ? newline : length;
//             do {
//                 int end = Math.min(newline, i + MAX_LOG_LENGTH);
//                 String part = message.substring(i, end);
//                 if (priority == Log.ASSERT) {
//                     Log.wtf(tag, part);
//                 } else {
//                     Log.println(priority, tag, part);
//                 }
//                 i = end;
//             } while (i < newline);
//         }
//     }
// }


// Path: app/src/main/java/com/jaeckel/etherwallet/EtherApp.java
import android.app.Application;
import com.jaeckel.etherwallet.util.DebugTree;
import timber.log.Timber;

package com.jaeckel.etherwallet;




public class EtherApp extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        Timber.plant(new DebugTree());