Activity log
What is recorded per garage, how long it is kept, and the Discord webhook.
Every garage keeps its own history, readable in the manage menu by the owner and by every co-owner. Eleven actions are recorded, grouped into the three filters the panel offers:
| Filter | Actions |
|---|---|
| Vehicles | stored, taken, replaced |
| Access | entered, left, joined as guest, invite sent |
| Ownership | purchased, sold, co-owner added, co-owner removed |
Every row carries who did it and when. What stands next to it depends on the action: the three vehicle rows carry the plate, a replacement both plates, purchased and sold carry the amount, and invite sent, joined as guest, co-owner added and co-owner removed carry a player name. Entered and left carry nothing else.
How long it is kept
Config.Database = {
logRetentionDays = 14,
}ktx_garages_logs is the only table here that grows on its own, so it is swept once a day and anything older than this is dropped. Raising it costs nothing but rows.
Discord
Config.Logging = {
enable = true,
useOxLibLogger = false,
discord = {
webhookURL = GetConvar("ktx_garages_webhook", ""),
username = "ktx_garages Logs",
color = 15844367,
title = "Player log",
},
}Config.Logging.enable is the switch, one level above the discord block. What sits inside discord is where the message goes and what it looks like when it arrives.
The URL comes from a convar, not from the file:
set ktx_garages_webhook "https://discord.com/api/webhooks/..."The config is unencrypted and also loaded on the client, so a URL written into it reaches every player on the server. The convar stays on the server.
useOxLibLogger sends the same events through ox_lib's logger instead, for a server that already collects its logs somewhere.