lib audit_logging: re-factor and add functions.