Discussion:
logging for analysis
(too old to reply)
Jeff Kish
2008-01-23 02:04:06 UTC
Permalink
Hi.
I posted this to comp.lang.java.programmer yesterday, and I'm looking
for a bit more feedback.

I'm still relatively new to java.
I am trying to analyze and figure out on my own how a
proprietary frameworks 'works'.

It is event driven, and I tried putting a bunch of System.out.println
statements in, but:
1 - because (i come from c++ background) there are no destructors I
don't know for sure when things 'go away'
2 - everytime (it is still being developed) I get a bunch of debug in,
I use it for a day or two (yes it takes me that long to figure out
stuff .. my memory is kind of overloading) and then I have to get a
new version and put everything in all over again.

Does anyone have a suggestion on how to go about analyzing this?
I find there are a hand full of objects (session, etc) that have a
handful of important methods (handleTheEvent(...) etc) that are worth
logging.

I'd like to be able to output to a log file of some sort information
so I can play back a visualization of the events as they are fired and
handled by objects and their descendents.

I hope this isn't too much. I appreciate any thoughts.

thanks
Jeff
TomE
2009-02-24 20:06:25 UTC
Permalink
Another approach would be to use AspectJ to write some aspects which are
then added to the classes of the framework.
One could add Aspects for all calls for actionPerformed(...), foo(),
whatever which simply print out what's going on, i.e. the arguments of
the method (to which the aspect was put to), and so on.
But this is an advanced approach, I think, yet simple if one knows about
AspectJ.

TomE
Post by Jeff Kish
Hi.
I posted this to comp.lang.java.programmer yesterday, and I'm looking
for a bit more feedback.
I'm still relatively new to java.
I am trying to analyze and figure out on my own how a
proprietary frameworks 'works'.
It is event driven, and I tried putting a bunch of System.out.println
1 - because (i come from c++ background) there are no destructors I
don't know for sure when things 'go away'
2 - everytime (it is still being developed) I get a bunch of debug in,
I use it for a day or two (yes it takes me that long to figure out
stuff .. my memory is kind of overloading) and then I have to get a
new version and put everything in all over again.
Does anyone have a suggestion on how to go about analyzing this?
I find there are a hand full of objects (session, etc) that have a
handful of important methods (handleTheEvent(...) etc) that are worth
logging.
I'd like to be able to output to a log file of some sort information
so I can play back a visualization of the events as they are fired and
handled by objects and their descendents.
I hope this isn't too much. I appreciate any thoughts.
thanks
Jeff
Loading...