mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-12-23 00:57:13 +00:00
add improvements in logging functionality
This commit is contained in:
parent
816cf00dac
commit
ffc0f5abb7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user