mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-07 00:59:57 +00:00
add improvements in logging functionality
This commit is contained in:
@@ -11,9 +11,9 @@ import io.ktor.client.HttpClient
|
||||
import kotlinx.serialization.json.Json
|
||||
|
||||
@RiskFeature
|
||||
fun createTelegramBotDefaultKtorCallRequestsFactories() = listOf(
|
||||
SimpleRequestCallFactory(),
|
||||
MultipartRequestCallFactory(),
|
||||
fun createTelegramBotDefaultKtorCallRequestsFactories(logger: KSLog? = null) = listOf(
|
||||
SimpleRequestCallFactory(logger),
|
||||
MultipartRequestCallFactory(logger),
|
||||
DownloadFileRequestCallFactory,
|
||||
DownloadFileChannelRequestCallFactory
|
||||
)
|
||||
|
@@ -38,7 +38,7 @@ class DefaultKtorRequestsExecutor internal constructor(
|
||||
private val callsFactories: List<KtorCallFactory> = callsFactories.run {
|
||||
if (!excludeDefaultFactories) {
|
||||
logger.v { "Installing default factories" }
|
||||
this + createTelegramBotDefaultKtorCallRequestsFactories()
|
||||
this + createTelegramBotDefaultKtorCallRequestsFactories(logger)
|
||||
} else {
|
||||
logger.v { "Default factories will not be installed" }
|
||||
this
|
||||
|
Reference in New Issue
Block a user