how to catch debug joint points? [message #587002] |
Fri, 25 February 2005 06:48 |
Eclipse User |
|
|
|
Originally posted by: snpooo.gmail.com
I am planning to implement logging aspect with AspectJ, but i don't know
how to log debug info using AspecJ?
I can log debug info at any interested place in oop system.
For example:
public class ClassA {
...
public void MethodA(int a){
...
if(debugEnabled)
log.debug("debug info, a= "+ a);
}
}
...
}
In aop system, how can I get the same function as above?
If I add a String field member and assign it the debug info at where debug
info need to be logged, then i use apsect to catch this field write
joinpoint and log debug info.
e.g.
public class ClassA {
...
public void MethodA(int a){
...
String debugstring="debug info, a= "+ a;
}
}
...
}
is this method feasible? any other idea?
Thanks a lot!
Best regards
|
|
|
Powered by
FUDForum. Page generated in 0.03147 seconds