mirror of
https://github.com/InsanusMokrassar/docs.git
synced 2025-12-16 03:05:35 +00:00
start fill new docs for logging in bot
This commit is contained in:
15
docs/tgbotapi/logs.md
Normal file
15
docs/tgbotapi/logs.md
Normal 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")
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user