DirkScripts Logo

Login With FiveM

Login

πŸ“š Library
β€Ί
Modules
β€Ί

logger

Logger

ℹ️ Server Module

lib.logger

Sends structured log entries to an external logging service. Logs are buffered and flushed every 500ms via HTTP.

lua
lib.logger(source, event, message, ...)
ParameterTypeRequiredDescription
sourcenumberyesPlayer source (use 0 for system logs)
eventstringyesEvent or service name
messagestringyesLog message (colour codes are auto-stripped)
...stringnoAdditional tags

Supported Services

Configure with the dirk:logger convar.

ServiceKey ConvarEndpointNotes
datadogdatadog:keyhttps://http-intake.logs.{site}/api/v2/logsdatadog:site defaults to datadoghq.com
fivemanagefivemanage:keyhttps://api.fivemanage.com/api/logs/batchβ€”
lokiloki:user, loki:password or loki:key, loki:endpoint{endpoint}/loki/api/v1/pushOptional loki:tenant for multi-tenancy

Convars

ConvarDescriptionDefault
dirk:loggerService name (datadog, fivemanage, loki)datadog
dirk:logger:hostnameHostname overridesv_projectName or fxserver

Example

lua
-- Log a player action
lib.logger(source, 'inventory', 'Picked up weapon_pistol')

-- System log with extra tags
lib.logger(0, 'startup', 'Server initialised', 'version:1.2.0')

Copyright Β© 2026 DirkScripts.

Not affiliated with or endorsed by Rockstar North, Take-Two Interactive, or any other rights holders. FiveM is a copyright and registered trademark of Take-Two Interactive Software, Inc.
Our checkout system is provided by Tebex Limited, who manage payment processing, product delivery, and billing support. Prices shown in currencies other than GBP are approximate conversions updated daily. All purchases are processed in GBP, so the final amount charged may vary depending on your bank or payment provider’s exchange rate.