Nuta
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować się zalogować lub zmienić katalog.
Dostęp do tej strony wymaga autoryzacji. Możesz spróbować zmienić katalogi.
This PlayFab SDK supports extensible debug tracing. Use debug tracing when you're encountering errors and want a full picture of what calls the game makes and the results the server returns. There are options to control the trace verbosity and integrate with your game's own debug logs. You can also direct output to the Output pane in Visual Studio.
Enable and set Verbosity
The following code example enables debug tracing and sets the debug error level to Verbose. You can also set the debug error level to Error to show only trace failed calls; or to Off to disable tracing.)
The resulting debug output is sent to the Output pane when running your project in Visual Studio.
HCSettingsSetTraceLevel(HCTraceLevel::Verbose);
HCTraceSetTraceToDebugger(true);
Connect to Game logs
To connect PlayFab's trace debugging to your game's own debug logs, use HCTraceSetClientCallback. Provide a callback that can take PlayFab trace output and direct to game logs.
void CALLBACK TraceCallback(
_In_z_ char const* areaName,
enum HCTraceLevel level,
uint64_t threadId,
uint64_t timestamp,
_In_z_ char const* message
)
{
// Log info
}
HCTraceSetClientCallback(TraceCallback);
Reference
PlayFab API reference documentation Trace API reference documentation