Skip to content

Add audit log support

Giuseppe Lavagetto requested to merge audit_log into main

If we want to be able to track changes to configuration objects that don't come from a git repository, we need a corresponding audit log.

We add audit log support to all write operations. The audit log is a module variable so it's a single one for all objects, and it emits log messages formatted as ECS (Elastic Common Schema) JSON objects.

The logger can be changed at runtime, and the default is to use the standard Python logger to log to syslog with the local0 facility. This is by far the simplest and most standard way to log audit events in the WMF production environment. The logs will be in json format, prepended by a @cee: token. This should make it easy to ship the logs to logstash for further processing.

Bug: T371783

Edited by Giuseppe Lavagetto

Merge request reports