1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-26 03:58:44 +00:00

add improvements in logging functionality

This commit is contained in:
InsanusMokrassar 2023-11-23 20:00:52 +06:00
parent 816cf00dac
commit ffc0f5abb7
2 changed files with 4 additions and 4 deletions

View File

@ -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
)

View File

@ -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