Write Audit Entry From Script?


I’ve noticed that activity from within a script does not appear to add audit log entries. Is there a way to add arbitrary audit log entries from within a script? For example I have scripts that copy pins, delete/add tokeninfo, etc and I would like audit entries when these actions are performed to appease the auditors.

The piece of information I’m missing is how to create/access the audit object itself since I do not appear to have access to current_app.config from within the script.