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

前端 未结 5 1976
庸人自扰
庸人自扰 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:11

    Have you tried to look at slf4j? It has LocationAwareLogger that can collect automatically method name.

提交回复
热议问题