Search code examples
grailsgrails-plugingrails3audit-logging

How to log all CRUD operations in Grails?


In Grails audit logging, I customized the audit-logging to be enabled to log the SELECT statements, but it is required to only log the fields that are displayed on the screen view. Is there a way for such a case?


Solution

  • Finally I could enhance the audit plugin to let it log the only view fields on a page. This was achieved using meta programming techniques. More specifically, I could fetch every getter result and save it in a map. I had to create filter/interceptor to catch every transaction and save it in that map. At the end, the data in the map is pushed in a document database.