The Web SDK writes different type of logs to the browser console to help in debugging at development phase. EnableX provides two methods to access and control these log entries.
Table of Contents
Enable Log
The IO Operations to write log may be a considerably time consuming task. Therefore, you may like to have control to enable or disable logging.
Method: static Future<void> enableLogs(bool status)
Parameter: bool status – Set true
to enable and false
to disable logging
EnxRtc.enableLogs(true); // To enable logging EnxRtc.enableLogs(false); // To disable logging
Share Log with EnableX to audit
To share console logs with EnableX Tech Team use the available method in SDK. The method sends latest 500 lines of console log to EnableX using HTTP Post. You may need to build your own UI around it. Please request for user’s consent before you post log to EnableX.
You must enable logging before you can share it.
Method: static Future<void> postClientLogs()
EnxRtc.postClientLogs(); // To post log to audit