Remove any 'import android.util.Log' from a file and you can include your own log class:
// log.java
package com.my.package;
public class Log {
public static int v(String tag, String msg) { return println(android.util.Log.VERBOSE, tag, msg); }
public static int d(String tag, String msg) { return println(android.util.Log.DEBUG, tag, msg); }
public static int i(String tag, String msg) { return println(android.util.Log.INFO, tag, msg); }
public static int w(String tag, String msg) { return println(android.util.Log.WARN, tag, msg); }
public static int e(String tag, String msg) { return println(android.util.Log.ERROR, tag, msg); }
public static int println(int priority, String tag, String msg) {
// Do another thing
return android.util.Log.println(priority, tag, msg);
}
}
Then you can leave all your 'Log.e' lines undisturbed, but still intercept the logging lines.
This isn't a complete replacement/implementation of the android.util.Log class, but it's got all the functions I use and it's easy to extend if you need to.