1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 16:23:48 +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 import kotlinx.serialization.json.Json
@RiskFeature @RiskFeature
fun createTelegramBotDefaultKtorCallRequestsFactories() = listOf( fun createTelegramBotDefaultKtorCallRequestsFactories(logger: KSLog? = null) = listOf(
SimpleRequestCallFactory(), SimpleRequestCallFactory(logger),
MultipartRequestCallFactory(), MultipartRequestCallFactory(logger),
DownloadFileRequestCallFactory, DownloadFileRequestCallFactory,
DownloadFileChannelRequestCallFactory DownloadFileChannelRequestCallFactory
) )

View File

@ -38,7 +38,7 @@ class DefaultKtorRequestsExecutor internal constructor(
private val callsFactories: List<KtorCallFactory> = callsFactories.run { private val callsFactories: List<KtorCallFactory> = callsFactories.run {
if (!excludeDefaultFactories) { if (!excludeDefaultFactories) {
logger.v { "Installing default factories" } logger.v { "Installing default factories" }
this + createTelegramBotDefaultKtorCallRequestsFactories() this + createTelegramBotDefaultKtorCallRequestsFactories(logger)
} else { } else {
logger.v { "Default factories will not be installed" } logger.v { "Default factories will not be installed" }
this this