How would you implement audit logging in a distributed system?

Technical