Server-Side Exports
Log
The primary export for sending logs to a specific dataset.
Definition:
Shorthand Exports
For convenience, the SDK provides shorthands for common log levels. These always send to the specified dataset.Info(datasetId, message, metadata)Warn(datasetId, message, metadata)Error(datasetId, message, metadata)
LogMessage
A legacy/shorthand export that sends logs to the "default" dataset.
Datasets
Datasets allow you to categorize your logs in the Fivemanage dashboard. You can create different datasets for different purposes, such aseconomy, anticheat, admin_actions, etc.
If a dataset name is provided that doesn’t exist, it will be created automatically (depending on your Fivemanage plan/settings).
Automatic Player Identifiers
When you includeplayerSource or targetSource in the metadata, the SDK automatically fetches and appends player identifiers (License, Discord, Steam, etc.) to the log entry.
This makes it incredibly easy to track actions back to specific players without manually gathering identifiers every time.
Automatic Event Logging
The SDK can be configured to automatically log common FiveM events. This is managed in theconfig.json file.
Supported automatic events:
- Player Events: Connections, disconnections.
- Chat Events: All chat messages.
- Base Events: Resource starts/stops.
- txAdmin Events: Admin actions.
- ox_inventory: Item movements, purchases, etc. (if installed).
.png?fit=max&auto=format&n=tUtwuHgibAuVylZ9&q=85&s=44653a825fa0664047dae92cd8969b2d)
