Create Log
horizon_create_logWrites a server-side INFO, WARN, or ERROR log entry for a player, making technical events and handled errors visible in the dashboard's user logs for debugging.
Instructions
Writes one server-side log entry (INFO, WARN or ERROR) for a player, visible in the horizOn dashboard's user logs. Use when: the game records a technical event or a handled error for later debugging, for example a failed purchase or a slow load. Not for: crashes and exceptions with a stack trace (use horizon_create_crash_report) or messages written by players (use horizon_submit_feedback). Requires: a userId from horizon_signup_* or horizon_signin_* and a positive userLogs quota for the hosted tier (horizon://api/feature-limits); no session token. Side effects: creates one log entry per call; a repeat creates a duplicate. Returns: {id, createdAt} of the new entry. Errors: 403 when logging is disabled by quota or the player belongs to another project. 400 for an invalid userId: pass the ID from the sign-in result. Needs HORIZON_API_KEY. Every failure returns an error result (isError) with the HTTP status and body: a 401 that horizon_test_connection also returns means HORIZON_API_KEY is wrong, 429 means the account's per-minute rate limit was reached (wait a minute, then retry).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"userId": "<userId>",
"message": "<message>",
"type": "<type>"
},
"name": "horizon_create_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Log level: INFO, WARN or ERROR | |
| userId | Yes | Player user ID (UUID) from horizon_signup_* or horizon_signin_* | |
| message | Yes | Log message (max 1000 characters) | |
| errorCode | No | Optional code to group entries in the dashboard, useful with ERROR, for example 'IAP_TIMEOUT' (max 50 characters) |