How to automatically log the entry/exit of methods in Java?

前端 未结 5 1963
庸人自扰
庸人自扰 2020-12-02 17:37

Right now I am using java.util.logging to log the entry and exit points of each method in my Java project. This is very useful to me when debugging.

I h

5条回答
  •  时光取名叫无心
    2020-12-02 18:19

    You should look at Aspect Oriented Programming, particularly the around() joinpoint that would be useful to log the entry and exit of methods that you would like to qualify in the definition.

提交回复
热议问题