How do I get the method name from within that method? private final static String TAG = MainActivity.class.getSimpleName(); protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Log.d(TAG, new Exception().getStackTrace()[0].getMethodName() ); }