An audit log is a database table that contains information about changes made to other data, specifically about the event that results in the chage.
For example, we might record information about creating and update events for auction Items. The information that’s recorded usually includes the user, the date and time of the event, what type of event occurred, and the item that was changed.
Audit logs are often handled using database trigger, however it is not portable across databases.
You need to perform several steps to implement audit logging:
1. Mark the persistent classes for which you want to enable
2. Define the information that should be logged : user,date, time,
type of modification and so on.
3. Tie it all together with a Hibernate Interceptor that automatically
creates the audit trail for you.
Refer to : caveatemptorsrcjavaorghibernateauctionpersistenceaudit