The fxvault resource can send logs from your own scripts, and log common server events for you. Lines go out in the background in batches and are retried, so logging never slows the server. Up to 20,000 lines or 16 MB wait if the service cannot be reached.
Logs need version 1.1.0 or later of the resource. 1.2.0 adds the performance monitor, and the current download, 1.2.1, also takes ox_lib's logs and sends them on with retries: see Send logs from ox_lib.
Download the resource
Unzip it into your resources folder.
https://api.fxvault.link/dl/fxvault.zipAdd the key and the convars
In
server.cfg. Useset, neversetrorsets, and keep thesetlines aboveensure fxvault: inventory logging registers as fxvault starts, so a convar set after it is missed until a restart.set fxvault:key "fxv_..." # Or a separate key for logs, with Send logs: # set fxvault:logsKey "fxv_..." # Automatic events, each off until named: players, txadmin, inventory, deaths, resources, chat ("all" is every group but chat) # set fxvault:logs:events "players,txadmin,inventory" # Only to send logs to another address; unset, they go to logs.fxvault.link # set fxvault:logsApi "https://logs.fxvault.link" ensure fxvaultfxvault:keyneeds Send logs to send logs. Whenfxvault:logsKeyis set, it is used for logs instead.fxvault:logsApiis a base address, never a key, and only changes where logs go.- Turning an event group on both in
fxvault:logs:eventsand in fmsdk'sconfig.jsonstores each event twice.
Log from your scripts
The first argument is the dataset.
playerSourceadds that player's identifiers, read when the line is logged.exports.fxvault:info("economy", "Ava paid 500 for a car", { playerSource = source, amount = 500 }) exports.fxvault:log("anticheat", "warn", "Speed far above the limit", { playerSource = source, speed = 412 })The exports are
log(dataset, level, message, meta), anddebug,info,warnanderror, which take the same arguments without the level.Check it
Run
fxvault statusin the server console. It shows a logs line.
Automatic events
Each group is off until you name it in fxvault:logs:events. The groups are
players, txadmin, inventory, deaths, resources and chat. all turns on
every group except chat, which is only ever on by name.
Source: FiveM convars.