start fill new docs for logging in bot

This commit is contained in:
2023-11-23 12:56:00 +06:00
parent a5ff5de5bd
commit 347896dbac
2 changed files with 16 additions and 0 deletions

15
docs/tgbotapi/logs.md Normal file
View File

@@ -0,0 +1,15 @@
# Logging
In this library we are using [KSLog](/kslog) for logging of events in telegram bots. There are several ways to set it
up and configure.
* Globally, you may change [DefaultKTgBotAPIKSLog]() logger __BEFORE__ creating of your bots
* Granular, you may configure and pass `logger` variable to the `KtorRequestsExecutor`
Besides, you always may pass your logger to the bot via `KtorRequestsExecutorBuilder`:
```kotlin
val bot = telegramBot(YOUR_TOKEN) {
logger = KSLog("SomeLogger")
}
```