Managing audit logging on a tenant and the system database