Syntax
Parameters
traceLevel PFTraceLevelIn The maximum verbosity to emit. Events at this level and at less verbose levels are emitted, and more verbose events are dropped. In order from least to most verbose, the
PFTraceLevel values are Off (0), Error (1), Warning (2), Important (3), Information (4), and Verbose (5). Pass PFTraceLevel::Off to drop all trace events in the PlayFab trace area.
Return value
Type: HRESULTS_OK if the trace level is set. E_INVALIDARG if traceLevel is greater than PFTraceLevel::Verbose; in that case, the current trace level doesn’t change.
Remarks
The PlayFab trace area contains the events thatPlayFabCore, PlayFabServices, and PlayFabGameSave log. PlayFabCore stores the level, and all three libraries use it. The default level is PFTraceLevel::Verbose. Each PFTraceLevel value equals the matching value of libHttpClient’s HCTraceLevel.
You can call this function at any time, including before PFInitialize. The level is stored atomically, so you can call this function from any thread. The level stays in effect after PFUninitializeAsync.
This function doesn’t change libHttpClient’s trace level. To control libHttpClient’s HTTP and WebSocket events, call HCSettingsSetTraceLevel. After PlayFab is initialized, PlayFab events that pass this filter go to the outputs that you configure through libHttpClient tracing, such as the debugger (HCTraceSetTraceToDebugger) and client callbacks (HCTraceSetClientCallback). They also go to the trace file if a call to PFTraceEnableTraceToFile before PFInitialize succeeded and the storage handlers can write the file.
The following example sends all PlayFab and libHttpClient trace events to the debugger.
Requirements
Header: PFTrace.h Library: PlayFabCore.lib Supported platforms: Windows, XBOX One family consoles, and XBOX Series consolesSee also
PFTrace membersDebug tracing
