> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PlayFab Lobby 和 Matchmaking SDK 中的诊断跟踪/日志记录

> 在 Android、Linux、Windows 及主机平台上从 PlayFab Lobby 和 Matchmaking SDK 捕获诊断跟踪与日志,用于问题排查。

# PlayFab Lobby 和 Matchmaking SDK 的跟踪/日志记录说明

本主题介绍如何捕获 PlayFab Lobby 和 Matchmaking SDK 生成的诊断跟踪。

> [!NOTE]
>
> 在每次发布之前,我们的 SDK 都会经过内部测试以确保达到预期的功能水平,通常默认情况下无需启用日志记录,尤其是在你的游戏发布版本中。但是,有时可能需要捕获生成的日志并与 Microsoft 共享以进行故障排除和诊断。

日志类型以及应如何配置/捕获日志取决于具体平台。我们的中间件 SDK(Unity 和 Unreal)使用 Lobby 和 Matchmaking C++ SDK 作为底层依赖组件,配置/捕获日志的过程与对应 C++ SDK 的过程相同或非常相似。所有必要的说明和指引都列在下表中:

## 各平台日志记录说明

| 平台 | 日志格式 | 日志记录说明指南位置 |
| - | - | - |
| Android | 纯文本 | 请参阅[此 `README.md` 文件](https://github.com/PlayFab/PlayFabMultiplayer/blob/main/TraceScripts/README.md)。 |
| Linux | 纯文本 | 请参阅[此 `README.md` 文件](https://github.com/PlayFab/PlayFabMultiplayer/blob/main/TraceScripts/README.md)。 |
| Switch | 纯文本 | 请参阅该 SDK 的 NuGet 包中包含的 `README.md` 文件的 `Logging` 部分。 |
| PlayStation 4 | 纯文本 | 请参阅该 SDK 的 NuGet 包中包含的 `README.md` 文件的 `Logging` 部分。 |
| PlayStation 5 | 纯文本 | 请参阅该 SDK 的 NuGet 包中包含的 `README.md` 文件的 `Logging` 部分。 |
| PC (GDK) 和 XBOX (GDK) | ETW 跟踪 | 请参阅[此 `README.md` 文件](https://github.com/PlayFab/PlayFabMultiplayer/blob/main/TraceScripts/README.md)。 |
| Windows 10 | ETW 跟踪 | 请参阅[此 `README.md` 文件](https://github.com/PlayFab/PlayFabMultiplayer/blob/main/TraceScripts/README.md)。 |
| iOS | 纯文本 | 请参阅[此 `README.md` 文件](https://github.com/PlayFab/PlayFabMultiplayer/blob/main/TraceScripts/README.md)。 |
| macOS | 纯文本 | 请参阅[此 `README.md` 文件](https://github.com/PlayFab/PlayFabMultiplayer/blob/main/TraceScripts/README.md)。 |


## Related topics

- [PlayFab Party SDK 中的诊断跟踪/日志记录](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/networking/party-logging.md)
- [处理 Lobby 和 Matchmaking C++ SDK 错误](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/lobby-and-matchmaking-client-sdk-errors.md)
- [Xbox Live 服务 API 故障排除](https://docs.xbox.com/zh-CN/services/xbox-services/develop/troubleshooting/live-troubleshooting-apis.md)
- [LogLevelType 枚举](https://docs.xbox.com/zh-CN/services/playfab/multiplayer/lobby/unity-multiplayer-api-reference/PlayFab.Multiplayer/LogLevelType.md)
- [编写自定义 CloudScript](https://docs.xbox.com/zh-CN/services/playfab/live-service-management/service-gateway/automation/cloudscript/writing-custom-cloudscript.md)
