Skip to content

Instantly share code, notes, and snippets.

@BOOtak
Created October 14, 2016 12:40
Show Gist options
  • Save BOOtak/45bb00f460984c7b498fb82ab0ca9742 to your computer and use it in GitHub Desktop.
Save BOOtak/45bb00f460984c7b498fb82ab0ca9742 to your computer and use it in GitHub Desktop.
public static void hackyLog(String msg) {
try {
throw new Exception("hack :-)");
}
catch(Exception exception0) {
String[] array_string = exception0.getStackTrace()[1].getClassName().split("\\.");
Log.d("paranoid.me_" + array_string[array_string.length - 1], "[" + exception0.getStackTrace()[
1].getMethodName() + ":" + exception0.getStackTrace()[1].getLineNumber() + "] " +
msg);
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment