Skip to main content
Enable Logs for the registered server and configure a Server API Key before using these server exports.

Send an event

Use debug, info, warn, error or fatal as shortcuts taking (message, options). The log export takes (level, message, options). A successful call means the event was queued locally, not that it is already searchable. The SDK sends batches of up to 50 events, normally every five seconds. Retryable requests reuse the same batch ID and payload.

Event options

Native prefixes are removed: discord:123 becomes { discord = "123" }. Use FIVEMESH_LOGS_EXCLUDED_IDENTIFIERS to omit native identifiers such as ip or discord. Client scripts should call a trusted server event that validates the request. Keep credentials and unrestricted Logs queries server-side.

Flush the queue

Query events

Queries default to the latest six hours and at most 100 results. Set from and to to RFC 3339 times, or use lookbackMinutes when from is omitted. A query can span at most seven days and is limited by the plan’s retention. Supported filters include level, eventType, resource, message, playerId and an exact identifier = { owner = "player", key = "discord", value = "123" }. Identifier owner may be player or target. You can select a named keyProfile. For pagination, preserve the original explicit time bounds and all filters while passing pagination.nextCursor. With the default six-hour query, save the resolved range from the first response as in the example above. Start a new search if the cursor expires. A server-bound key resolves the cfx.re join code automatically. For a global key, set FIVEMESH_SERVER_ID or supply serverId.