Record Java comments
•
Java
Are there any libraries that can record variables by adding comments:
@Log String someValueToLog = someMethod(); @Log(level="debug",prefix="Here's the value=") String someValueToLogAgain = someMethod();
This function is similar to adding this line to the code:
log.info(someValueToLog); log.debug("Here's the value="+someValueToLogAgain);
Solution
You need to write custom comments for this This is an attempt to use AspectJ AOP:
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码