A comprehensive FiveM development library that streamlines resource creation through shared utilities, UI components, and common framework abstractions.
For guidelines to contributing to the project, and to see our Contributor License Agreement, see CONTRIBUTING.md. For additional legal notices, refer to NOTICE.md.
- cfxlua-require (included in release)
https://overextended.dev/ox_lib
https://github.com/overextended/ox_lib/releases/latest/download/ox_lib.zip
https://www.npmjs.com/package/@overextended/ox_lib
This fork includes native Beaver support as a built-in logging backend — no extra resources needed. Send your FiveM server logs directly to your Beaver dashboard alongside the existing Datadog, FiveManage, and Loki backends.
- Batched log ingestion — Logs buffer and send every 500ms or when the batch size threshold is reached
- Rate limit handling — Automatically respects 429 responses from the Beaver API with
Retry-Aftercooldown - Structured player identity — Collects player name, license, discord, fivem, and steam identifiers (never IP)
- Coords metadata — Attach coordinates to log entries for heatmap widgets on the dashboard
- Configurable severity —
info,warning,error,success(defaults toinfo) - Startup health check — Verifies connectivity to the Beaver API on resource start
- Anti-tamper security — Protects ox_lib from being stopped/restarted by cheat menus when Beaver logging is active
- Debug mode — Verbose console output for troubleshooting
Add the following to your server.cfg:
# Select Beaver as the logging backend
set ox:logger "beaver"
# Your Beaver API key (generated in the Beaver dashboard under Server Settings > API Keys)
set beaver:apiKey "beaver_your64hexkeyhere"
# Your Beaver API ingest endpoint
set beaver:endpoint "https://your-api.com/api/ingest"
# Optional: enable verbose debug output (default: false)
set beaver:debug "false"
# Optional: max logs per batch before force flush (default: 50)
set beaver:maxBatchSize "50"-- Basic log
lib.logger(source, 'playerJoined', 'Player connected to server')
-- With severity
lib.logger(source, 'bankRobbery', 'Robbery started at Pacific Standard', { severity = 'warning' })
-- With coords for heatmap widgets
lib.logger(source, 'fpsDrop', 'Player FPS dropped below 20', {
severity = 'warning',
coords = { x = 215.3, y = -810.5, z = 30.7 }
})
-- With custom tags and options
lib.logger(source, 'addMoney', 'Added $5000 to bank', 'amount:5000', 'type:bank', { severity = 'info' })
-- System event (source = 0)
lib.logger(0, 'serverStart', 'Server started successfully', { severity = 'success' })| Level | Use case |
|---|---|
info |
General events — player joins, job changes, transactions (default) |
warning |
Notable events — low FPS, suspicious activity, robberies |
error |
Failures — script errors, failed transactions, connection issues |
success |
Positive confirmations — server start, successful operations |
Pass a coords table in the options to enable heatmap visualisation on the Beaver dashboard:
lib.logger(source, 'fpsDrop', 'Low FPS detected', {
coords = { x = playerCoords.x, y = playerCoords.y, z = playerCoords.z }
})Note: If you were previously using the standalone
dashy-loggingresource, you can remove it — this fork replaces it entirely. Just configure the convars above and you're good to go.
- Install Lua Language Server to ease development with annotations, type checking, diagnostics, and more.
- Download fivem-lls-addon to add support for native declarations and other platform-specific functionality.