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:
| Level | What is logged |
|---|---|
LogLevel.NONE | Nothing. |
LogLevel.ERROR | Failures that stopped something, such as a failed join or a denied camera. |
LogLevel.WARN | Adds problems that didn't stop anything, such as high CPU use, low bandwidth or packet loss. |
LogLevel.INFO | Adds milestones, such as joining and leaving, and changes in the connection. |
LogLevel.DEBUG | Adds more detail. Useful while you build your call flow, but too noisy for release builds. |
LogLevel.ALL | Adds 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

