Logger
Initialization
To get logs from SDK, you need to set InAppStoryManager.logger with instance of InAppStoryManager.IASLogger interface:
class IASLoggerImpl : InAppStoryManager.IASLogger {
override fun showELog(tag: String, message: String?) {
Log.d("IAS_SDK_LOG", "${tag ?: "IAS_SDK_EMPTY_TAG"} ${message ?: ""}")
}
override fun showDLog(tag: String, message: String?) {
Log.d("IAS_SDK_LOG", "${tag ?: "IAS_SDK_EMPTY_TAG"} ${message ?: ""}")
}
}
fun setLogger() {
InAppStoryManager.logger = IASLoggerImpl()
}
By default SDK has its own implementation of logger
private class IASDefaultLoggerImpl : InAppStoryManager.IASLogger {
override fun showELog(tag: String, message: String?) {
Log.d(tag, message.orEmpty())
}
override fun showDLog(tag: String, message: String?) {
Log.d(tag, message.orEmpty())
}
}
Common tags
SDK Logger has special tags for different situations. Started from 1.23.x you can find next tags:
For showELog:
IAS_SDK_Error- in case of any error (wrong data, inconsistent state, internal errors) that stops action process.
For showDLog
IAS_SDK_Warn- in case of any error, that does not stops action processIAS_SDK_GetJS_Story- WebView to SDK interactions in storiesIAS_SDK_CallJS_Story- SDK to WebView interactions in storiesIAS_SDK_Console_Story- WebView console logs in storiesIAS_SDK_Game_Loading- Game loading process logsIAS_SDK_GetJS_Game- WebView to SDK interactions in GamesIAS_SDK_Console_Game- WebView console logs in GamesIAS_SDK_CallJS_IAM- logs for SDK to WebView interactions in In-App MessagesIAS_SDK_Console_IAM- WebView console logs in In-App MessagesIAS_SDK_CallJS_Banner- SDK to WebView interactions in bannersIAS_SDK_Console_Banner- WebView console logs in bannersIAS_SDK_Network- logs from any API or files requestsIAS_SDK_Cancel_Token- all logs about cancel token