Documentation
SwitchGuard Pro
Audit Log

Audit Log

Navigate to SwitchGuard → Audit Log.

Every switch event is recorded automatically. The log cannot be edited from the UI - it is append-only.

Log Columns

ColumnDescription
IDAuto-increment log entry ID
Eventswitch_to, switch_back, switch_off, auto_switch_back
SwitcherUser who initiated the switch (name + ID)
TargetUser who was switched to (name + ID)
IP AddressSwitcher's IP address at time of event
User AgentBrowser/client user-agent string
TimestampDate and time of the event

Log Settings

SettingDefaultDescription
Retention Days30Audit records older than this are deleted by the daily cron

The daily cleanup cron runs switchguard_daily_cleanup and purges records older than the retention period.

Exporting the Log

Click Export CSV in the Audit Log screen to download all records in the current filtered view as a CSV file. Useful for compliance reporting.

The log is stored in the {prefix}switchguard_log WordPress database table. Database-level access by a privileged admin could modify records. For tamper-proof audit trails, pipe the switchguard_switched action to an external log service.