How to: Enable error and performance logging
The Rights Management SDK 4.2 manages diagnosis and performance logs upload through a single device property.
You can improve your users' experience and troubleshooting by enabling automatic diagnostics and performance logging upload to Microsoft. In order to honor user privacy, you as the app developer, must ask the user to consent before enabling the automatic logging.
You will manager logging control through two properties.
Enable logging through the IpcCustomerExperienceDataCollectionEnabled property. The setting is persistent across device resets.
Control the logging level through the IpcLogLevel property using the following settings.
- 1 - Verbose
2 - Informational
3 - Warning
4 - Error
5 - CriticalThe default setting is 2. Setting this property is optional for the app.
In each of the example code snippets following, the calling application can set or query the property.
Android | ||
Enable automatic logging |
|
|
Get current logging control flag setting |
|
iOS | ||
Enable automatic logging |
|
|
Get current logging control flag setting |
|
|
Set log level control |
|
|
Get log level control setting |
|
Windows | ||
Enable automatic logging |
For more information on optional settings, see [CustomerExperienceOptions](customerexperienceoptions.md). |
|
Get current logging control flag setting |
|
Note
The Windows code snips above are in C++. For C#, update the syntax with . in place of :: .
Linux / C++ - This SDK has some basic logging that is not as extensive as that of the other platforms. For more information see the Troubleshooting section of the "README.md" at RMS SDK for portable C++.