How to log(debug) javaagent with agent options

一笑奈何 提交于 2019-12-25 06:54:12

问题


I set up my javaagent in the like this:

-javaagent:/usr/pkg/tomcat/lib/aspectjweaver-1.7.3.jar

But it does not work, so I would be interested to have a look at the logs. What can I add to javaagent if I want to get log messages? (stacktrace, which classes were loaded etc...)

I beleive "options" should be used for this.

The documentation says:

implementations with a command-line interface, an agent is started by adding this option to the command-line:

-javaagent:jarpath[=options] 

jarpath is the path to the agent JAR file. options is the agent options

What exactly should I write within the square brackets? "Log"? "Debug"? Something else? I know its lame but I can't find the correct syntax.


回答1:


this needs to be added

-Daj.weaving.verbose=true


来源:https://stackoverflow.com/questions/21733303/how-to-logdebug-javaagent-with-agent-options

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!