What gets recorded
Not every click, but every action that changes state. Deletions, permission changes, price and amount changes, exports and failed sign-in attempts. Recording everything produces noise, and the line that matters disappears underneath it.
Before and after
Knowing that a record changed is not enough, what it changed from and to is held as well. On its own, the fact that something changed means nothing when a dispute comes up.
Who and from where
The user, the time and the address the request came from are recorded. With a shared account this question cannot be answered, which is why we recommend named accounts.
Protecting the record
The log should be append only and not editable through the application. It should also be copied off the machine, because the first thing an intruder does is clear the log.
Making it visible
A log that is collected and never looked at may as well not exist. Showing the records in the panel with filters is the only reason keeping them makes sense.
Retention
Logs carry personal data too. How long they are kept is written down and expired entries are removed, otherwise the thing kept for security becomes a risk in its own right.