jvmMain.com.algolia.instantsearch.insights.internal.logging.InsightsLogger.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of instantsearch-insights Show documentation
Show all versions of instantsearch-insights Show documentation
InstantSearch Android is a library providing widgets and helpers to help you build the best instant-search experience on Android with Algolia. It is built on top of Algolia's Kotlin API Client to provide you a high-level solution to quickly build various search interfaces.
package com.algolia.instantsearch.insights.internal.logging
import com.algolia.instantsearch.insights.Insights
import com.algolia.search.model.IndexName
import org.slf4j.LoggerFactory
internal actual object InsightsLogger {
private val logger = LoggerFactory.getLogger(Insights::class.java)
actual var enabled: MutableMap = mutableMapOf()
actual fun log(indexName: IndexName, message: String) {
if (enabled[indexName] == true) {
logger.debug("Index=$indexName: $message")
}
}
actual fun log(message: String) {
logger.debug(message)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy