How to make audit save records to the db

Some docs: