You can use a logger to write.
I think if you want to write your method name inside the method then you have to use the reflection.
example
(you need a logger to write it like java.util.logger)
//if hello is the only method then this code would do
somelog(this.getClass().getMethods()[0].getName()
but if more than one method then is it little bit complicated. I will not confuse you more but If you do need to know more let me know.
Hope this helps
Kareem