I have a task to change an audit implementation in an application in which I work.
The audit requirement is to know the history of changes, and the execution of certain tasks by a particular user. (Initial State -> Modification 1 -> ... -> Modification N)
The problem is that the current implementation saves the state of the serialized Java object in a CLOB field in the database, and thus we have some problems:
Discussing with others, we come up with some possible implementations:
- Serialize the Java object in JSON (which would easily discover the code version used by the number of JSON attributes, and it would be humanly possible to read the content in the database).
- Another solution I found would be to use an audit framework that is easily integrable with Spring: Audit4J . It has a customizable layout, is also humanly readable, and has several features that are very interesting. audit4j
I would like to know in this case what would be the best practices for performing an audit implementation that is: Humanly readable (database), low maintenance, and problems between code versions not so dramatic.