While comparing the run of my wizard and a similar standard one, I have to check all entrances into all functions for both cases. Is there some tool that can automate the process? I can't do it by simply inserting the log lines in code, because 98% of the process run inside the code of library functions. Can the java machine catch every entrance or leave in/out of every method and log it somewhere?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
With Aspect Oriented Programming, you can use an annotation which executes Before (entering), After, or Around (before and after) a method. There isn't anything specifically designed to execute when entering a method, unless you used @After.
For more information regarding the syntax and options, here is a link to Spring's online documentation: http://static.springsource.org/spring/docs/2.0.x/reference/aop.html
It logs through SLF4J.