
严重等级分类
记录 INFO、WARN 和 ERROR 事件,将有效信号与噪音分离,优先处理需要关注的问题。
玩家级别的历史记录
每条日志都关联了用户 ID,可以即时调取任意玩家的完整活动轨迹。
加速客服响应
为客服团队提供可搜索、带时间戳的日志,无需开发人员介入即可诊断玩家问题。
快速集成
活动日志
// Unity C#: User Logs (attached to the signed in player)
using PM.horizOn.Cloud.Manager;
// INFO and WARN entries
await UserLogManager.Instance.Info("Player entered zone A");
await UserLogManager.Instance.Warn("Low memory detected");
// ERROR entry with an error code (max 50 characters)
await UserLogManager.Instance.Error("Save failed unexpectedly", "SAVE_ERR_001");# REST API: User Logs
# Create an INFO log entry
curl -X POST https://horizon.pm/api/v1/app/user-logs/create \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"userId":"USER_ID","message":"Player entered zone A","type":"INFO"}'
# Create an ERROR log with error code
curl -X POST https://horizon.pm/api/v1/app/user-logs/create \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"userId":"USER_ID","message":"Save failed","type":"ERROR","errorCode":"SAVE_ERR_001"}'这些示例使用 Unity SDK(C#)和 REST API。Godot 和 Unreal 在各自的 SDK 中有相同的调用: 参见快速入门
