开发者

@Profiled annotations (for using Perf4j logging) in Eclipse

Im trying to get the @Profiled annotation to time (and log) method calls using Perf4j in my eclipse project. This uses aspectj. Ive managed easily to get it to work 开发者_运维百科in the Windows command line with javac using the Perf4j Developers Guide. However the log files aren't created when I run the same code in an eclipse project. Ive tried many things including adding all the annotation weaver jars in the factory path but to no avail.


Download the Eclipse AJDT plugin and convert the project to a AspectJ project. Then it should work.

Do the following:

  • Mark the project, right click on it and add AspectJ nature.
  • On the AspectJ build-path you must add the jar file with the aspects. Ignore this if the aspect is part of the project and not a dependency.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜