Hi Leonardo,
thanks
See to start off, if you know how to use the managed bean then you are already 70 % in to the task.
Every CRUD (Create, Read, Update, Delete) on your db has to be logged on to a log file, if I am not wrong?
All this will happen by calling a method on the managed bean, all you have to do is use an opensource logging framework
The likes of
1. log4j
2. sl4j
I have worked with log4j all you have to do this mention in the log4j.config file as to what appender you are using (writing to a file, console, etc) and then instantiate the logger class and start logging it is as simple.
Just have a look at this for starters on how to use log4j, add this code to the calling method of your managed bean.
lo4j
Let me know if you need to know anything more.