|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value={METHOD,CONSTRUCTOR}) public @interface Profiled
The Profiled annotation is used in concert with the log4j or javalog TimingAspects to enable unobtrusive performance logging. Methods with this annotation, when enabled with the TimingAspect, will automatically have their execution time logged.
Optional Element Summary | |
---|---|
boolean |
el
Whether or not the tag and message elements should support Java Expression Language syntax. |
boolean |
logFailuresSeparately
Whether or not separate tags should be used depending on whether or not the annotated method returns normally or by throwing an exception. |
java.lang.String |
logger
The name of the logger (either a log4J or java.logging Logger, depending on the Aspect in use at runtime) to use to log the StopWatch . |
java.lang.String |
message
The optional message element can be used to set a message on the StopWatch that is logged. |
java.lang.String |
tag
The tag that should be set on the StopWatch when the execution time is logged. |
public abstract java.lang.String tag
StopWatch
when the execution time is logged. If not
specified then the name of the method being annotated will be used for the tag name.
public abstract java.lang.String message
StopWatch
that is logged.
public abstract java.lang.String logger
StopWatch
.
public abstract boolean el
@Profiled(tag = "myServlet{$0.pathInfo}", el = true) protected void doGet(HttpServletRequest req, HttpServletResponse res) { ... }If the doGet() method is called with a request whose getPathInfo() method returns "/sub/path", then the tag used when logging a StopWatch will be "myServlet/sub/path".
public abstract boolean logFailuresSeparately
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |