Skip to main content
Version: 3.x.x

Logs and Diagnostics - Android

The SDK writes log lines to Logcat. You can choose how much it logs.

Setting the log level​

VideoSDK.setLogLevel() sets how much the SDK logs. The level applies to the whole app process and takes effect straight away. Set it early, for example in Application.onCreate(), so that it also covers joining the room.

Each level shows everything the quieter levels show, plus one more kind of event:

LevelWhat is logged
LogLevel.NONENothing.
LogLevel.ERRORFailures that stopped something, such as a failed join or a denied camera.
LogLevel.WARNAdds problems that didn't stop anything, such as high CPU use, low bandwidth or packet loss.
LogLevel.INFOAdds milestones, such as joining and leaving, and changes in the connection.
LogLevel.DEBUGAdds more detail. Useful while you build your call flow, but too noisy for release builds.
LogLevel.ALLAdds frequent events, such as the active speaker, network quality and per-second statistics.
class MainApplication : Application() {
override fun onCreate() {
super.onCreate()
VideoSDK.initialize(applicationContext)

VideoSDK.setLogLevel(if (BuildConfig.DEBUG) LogLevel.DEBUG else LogLevel.WARN)
}
}

The SDK's Logcat lines have tags that start with VideoSDK. VideoSDK.getLogLevel() returns the level you set.

Errors​

Logs help you follow what the SDK did. To react to errors in your app, listen for onError() and catch VideoSDKException. See Error Events and Coroutines and Error Handling.

API Reference​

The API references for all the methods utilized in this guide are provided below.

Got a Question? Ask us on discord