Log File Access tutorial

Important

Functionality described in this document is currently in public preview. This preview version is provided without a service-level agreement, and we don't recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.

In this tutorial, you learn how to access the Log Files stored on the device.

Prerequisites

  • Access to a CallClient instance
// Call when a support request is being called
private void onSupportRequest(String userMessage) {
    // Assuming the getSupportFiles method returns a List or similar collection.
    List<SupportFile> supportFiles = callClient.getdebugInfo().getSupportFiles();

    // Send the files and any user message to your Ticket System            
    dispatchSupportRequestToBackend(userMessage, supportFiles);
}
// Call when a support request is being called
private func onSupportRequest(userMessage: String) {
    // Assuming the getSupportFiles method returns an array or similar collection.
    let supportFiles = callClient.debugInfo.getSupportFiles()
    
    // Send the files and any user message to your Ticket System            
    dispatchSupportRequestToBackend(userMessage: userMessage, supportFiles: supportFiles)
}
// Call when a support request is being called
private void OnSupportRequest(string userMessage) 
{
    // Assuming the GetSupportFiles method returns a List or similar collection.
    IReadOnlyList<SupportFile> supportFiles = callClient.DebugDetails.SupportFiles;

    // Send the files and any user message to your Ticket System            
    DispatchSupportRequestToBackend(userMessage, supportFiles);
}

Next steps

To add enhanced log collection capabilities to your app, consider the following points.

  1. Explore support features:
    • "Report an Issue" prompts
    • End-of-call surveys
    • Shake-to-report
    • Proactive autodetection
  2. Always obtain user consent before submitting data.
  3. Customize strategies based on your users.

Refer to the Conceptual Document for more in-depth guidance.

You may also like