Rate this page:

Collecting logs: Android

This article will help you to collect logs from Android SDK and WebRTC.

Contents

Copy URL

Collect Logcat logs (from Android Studio)

Copy URL

Logcat is a command-line tool that dumps a log of system messages when the device throws an error and sends messages that you have written from your app with the Log class.

  1. Open Logcat tab in Android Studio or select ViewTool WindowsLogcat from the menu bar.
  2. Filter device logs by the VOXSDK tag.
  3. We recommend to enable timestamp in Datetime format and thread id in the Logcat Formatting Options.
Logcat
Logcat Formatting options
  1. Reproduce the problem
  2. Once the problem is reproduced, select all logs in the logcat with Ctrl + A (Windows, Linux, Chrome OS) or Cmd + A (Mac), paste into any text editor, and save the file. The recommended file extensions are “.log” and “.txt”

Learn more about Logcat in the Android Developers user guide.

Collect logs to file (from Application)

Copy URL

Voximplant Android SDK provides the ILogListener interface that allows to collect the SDK log messages and save them in any convenient place, for example into a file.

ILogListener interface allows the applications to implement a log handler method that provides the following information:

  1. log message level represented by LogLevel enum
  2. log message in String format

A file logger can be configured at an application startup.

Sample FileLogger

Sample FileLogger

Extended logs

Copy URL

Voximplant Android SDK allows to enable extended logs that includes WebRTC logs of levels info, warning, and errors.

It is important to consider that extended logs will lead to a significant increase in the volume of logs, and may also affect application performance. It is recommended that extended logs are enabled only for diagnosing problems with audio and video transmission and at the request of technical support specialists.

To enable extended logs, use ClientConfig.enableDebugLogging on the SDK initialization:

enableDebugLogging

enableDebugLogging