SDK logs

Updated

Collect SDK logs for trouble shooting.

If you’re troubleshooting an issue with the Agora Chat SDK, Agora support team might ask you to send the SDK logs. Logs record information about events that occurred in the SDK. These include errors and warnings as well as informational events.

Collecting SDK logs

  • Enable log output:

    AC.logger.enableAll();
  • Disable log output:

    AC.logger.disableAll();
  • Set the level of logs to be output:

    // 0 - 5 or 'TRACE','DEBUG','INFO','WARN','ERROR','SILENT'.
    AC.logger.setLevel(0);
  • Set whether to cache logs:

    AC.logger.setConfig({
      useCache: false, // Whether to cache logs.
      maxCache: 3 * 1024 * 1024, // The maximum number of bytes of logs that can be cached.
    });
    // Cache logs of all levels
    AC.logger.setLevel(0);
  • Download logs:

    AC.logger.download();