Hey is it possible in Android to collect all Log.d from one class and keep on appending it and save it into SDCard ?
For example :
Class Android {
private final static String TAG = "hello";
public void abcd(){
Log.d(TAG, "it went into abcd method");
}
public void efgh(){
Log.d(TAG, "it went into efgh method");
}
/*Here collect all above LOGS and write to file in SDCard*/
}
You can override the Log class and do that yourself. But is it really required for your purposes?
You can get all logs with the
logcat
command. You can try something like:You can get more information about
logcat
here: http://developer.android.com/tools/help/logcat.htmlno, Log.* methods write to the console, however you can use Logger http://developer.android.com/reference/java/util/logging/Logger.html and a FileHandler