mirror of
https://github.com/InsanusMokrassar/docs.git
synced 2024-11-22 00:04:00 +00:00
start fill new docs for logging in bot
This commit is contained in:
parent
a5ff5de5bd
commit
347896dbac
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")
|
||||
}
|
||||
```
|
@ -14,6 +14,7 @@ nav:
|
||||
- 'tgbotapi/index.md'
|
||||
- KDocs: 'https://tgbotapi.inmo.dev'
|
||||
- 'tgbotapi/faq.md'
|
||||
- 'tgbotapi/logs.md'
|
||||
- Introduction:
|
||||
- 'tgbotapi/introduction/before-any-bot-project.md'
|
||||
- 'tgbotapi/introduction/including-in-your-project.md'
|
||||
|
Loading…
Reference in New Issue
Block a user