> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_mdt/features/audit-logs.md).

# Audit Logs

`rcore_mdt` can send important MDT actions to a Discord channel through a webhook.

## ⚙️ Setup

1. In Discord, open **Channel Settings > Integrations > Webhooks** and create a webhook.
2. Copy the webhook URL.
3. Open `configs/sv_config.lua` and set:

```lua
SV_CONFIG.Webhook = {
    Enabled = true,
    Url     = 'https://discord.com/api/webhooks/...',
}
```

Logging is disabled by default.

## 📋 Logged Actions

Each category can be turned on or off in `SV_CONFIG.Webhook.Actions`.

| Category     | Logs                                                              |
| ------------ | ----------------------------------------------------------------- |
| `incidents`  | Incident created, incident deleted, criminal removed.             |
| `penalCodes` | Penal code created, updated, deleted.                             |
| `bolos`      | BOLO created, updated, deleted.                                   |
| `bulletins`  | Bulletin posted, deleted.                                         |
| `profiles`   | Civilian profile edited, officer name changed or reset.           |
| `caseFiles`  | Topic created, updated, deleted. Reply created, deleted.          |
| `boards`     | Evidence board created, deleted.                                  |
| `fines`      | Fine status changed.                                              |
| `medical`    | Medical record created, updated, deleted.                         |
| `vehicles`   | Vehicle note added, deleted. Vehicle marked or cleared as wanted. |

Each log shows the player who did the action, with their department, rank, and identifier.
