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:
parent
816cf00dac
commit
ffc0f5abb7
@ -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
|
||||||
)
|
)
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user