title: How to get method name for debug output in Android/Java?
body: <p>I would like to make a macro that prints out the current method's name during Log.d and Log.e output.  Right now I simply type the method name within a hard-coded string, but this is obviously inefficient should the method name change in the future, as each string needs to be searched for and replaced.</p>
  
  <p>I am aware of using getMethodName() as indicated in this post:</p>
  
  <p><a href="https://stackoverflow.com/questions/3864175/how-to-get-the-name-of-method-in-current-class/3864230#3864230">How to get method name in Java</a></p>
  
  <p>This one also looks promising:</p>
  
  <p><a href="https://stackoverflow.com/questions/12155605/debugging-with-helper-extension-method-regarding-output-of-method-its-name-and">Debugging with helper extension method</a></p>
  
  <p>There are countless numbers of these posts on SO, but I'd like to find the best way for debugging purposes that does not impact runtime performance too much.  Since I am using Eclipse I would like to find a solution that works well with that IDE.</p>