Skip to main content
The Fivemanage SDK can be configured using both FiveM ConVars and a config.json file.

API Keys (ConVars)

API keys are sensitive and should be set in your server.cfg using ConVars. This prevents them from being accidentally shared if you share your resource files.
ConVarDescriptionRequired For
FIVEMANAGE_MEDIA_API_KEYYour Fivemanage Media API key.Images, Videos, Audio
FIVEMANAGE_LOGS_API_KEYYour Fivemanage Logs API key.Cloud Logging
set FIVEMANAGE_MEDIA_API_KEY "your_media_api_key"
set FIVEMANAGE_LOGS_API_KEY "your_logs_api_key"

config.json

The config.json file located in the fmsdk folder allows you to customize the behavior of the logging system and automatic events.

Logging Settings

PropertyTypeDefaultDescription
logs.levelstring"info"The minimum log level to capture. Must be one of the levels defined in logs.levels.
logs.levelsstring[]["error", "warn", "info", "debug"]Defines the hierarchy of log levels.
logs.consolebooleantrueWhether to print logs to the server console.
logs.enableCloudLoggingbooleantrueWhether to send logs to the Fivemanage cloud.
logs.appendPlayerIdentifiersbooleantrueAutomatically append player identifiers (license, discord, etc.) to logs when playerSource is provided.
logs.excludedPlayerIdentifiersstring[]["ip"]List of identifier types to exclude from logs for privacy.
logs.excludeInDepthMetadatabooleanfalseIf true, excludes some internal metadata like server session IDs.

Automatic Events

The SDK can automatically log certain server events to specific datasets.
PropertyDescription
logs.playerEventsLogs player connections and disconnections.
logs.chatEventsLogs all chat messages (can result in high log volume).
logs.baseEventsLogs base events like onResourceStart, onResourceStop.
logs.txAdminEventsLogs actions performed via txAdmin.
logs.oxInventoryEventsLogs inventory actions if using ox_inventory.
Each event category has the following structure:
"playerEvents": {
  "enabled": false,
  "dataset": "default"
}
  • enabled: Set to true to enable automatic logging for this category.
  • dataset: The name of the dataset in Fivemanage where these logs should be sent.

Example config.json

{
  "$schema": "./config.schema.json",
  "logs": {
    "level": "info",
    "levels": ["error", "warn", "info", "debug"],
    "console": true,
    "enableCloudLogging": true,
    "appendPlayerIdentifiers": true,
    "excludedPlayerIdentifiers": ["ip"],
    "excludeInDepthMetadata": false,
    "playerEvents": {
      "enabled": true,
      "dataset": "connections"
    },
    "chatEvents": {
      "enabled": false,
      "dataset": "chat"
    },
    "oxInventoryEvents": {
      "enabled": true,
      "dataset": "inventory"
    }
  }
}