views:

185

answers:

3

Hi folks, As my java application increases in complexity i want to write audit methods to make sure that i am doing the right thing.

How can i do it in java? thx

A: 

Log4J or System.out.println()

Woot4Moo
+2  A: 

he probably means unit tests

check this to get started: http://junit.sourceforge.net/

Stefan Ernst
+1 for telepathy
ChssPly76
A: 

Or perhaps using AspectJ to audit certain method calls?

You can make pointcuts which are like filters and catch when certain methods are called and get information about the parameters. This could be good for auditing.

Aspect J

Egg