Remove mentions of enable_logging! from documentation/readme

This commit is contained in:
Maybe Waffle 2022-03-21 19:42:55 +04:00
parent 29415a6d87
commit 22e5165f89
4 changed files with 6 additions and 15 deletions

View file

@ -92,7 +92,7 @@ use teloxide::prelude2::*;
#[tokio::main]
async fn main() {
teloxide::enable_logging!();
pretty_env_logger::init();
log::info!("Starting dices_bot...");
let bot = Bot::from_env().auto_send();
@ -164,7 +164,7 @@ async fn answer(
#[tokio::main]
async fn main() {
teloxide::enable_logging!();
pretty_env_logger::init();
log::info!("Starting simple_commands_bot...");
let bot = Bot::from_env().auto_send();
@ -218,7 +218,7 @@ impl Default for State {
#[tokio::main]
async fn main() {
teloxide::enable_logging!();
pretty_env_logger::init();
log::info!("Starting dialogue_bot...");
let bot = Bot::from_env().auto_send();
@ -338,15 +338,6 @@ Associated links:
- [Marvin's Marvellous Guide to All Things Webhook](https://core.telegram.org/bots/webhooks)
- [Using self-signed certificates](https://core.telegram.org/bots/self-signed)
**Q: Can I use different loggers?**
A: Yes. You can setup any logger, for example [fern]. teloxide has no specific requirements as it depends only on [log]. Remember that [`enable_logging!`] and [`enable_logging_with_filter!`] are just **optional** utilities.
[fern]: https://crates.io/crates/fern
[log]: https://crates.io/crates/log
[`enable_logging!`]: https://docs.rs/teloxide/latest/teloxide/macro.enable_logging.html
[`enable_logging_with_filter!`]: https://docs.rs/teloxide/latest/teloxide/macro.enable_logging_with_filter.html
## Community bots
Feel free to propose your own bot to our collection!

View file

@ -80,7 +80,7 @@
//!
//! #[tokio::main]
//! async fn main() {
//! teloxide::enable_logging!();
//! pretty_env_logger::init();
//! log::info!("Starting dialogue_bot!");
//!
//! let bot = Bot::from_env().auto_send();

View file

@ -38,7 +38,7 @@
//!
//! # #[tokio::main]
//! # async fn main() {
//! teloxide::enable_logging!();
//! pretty_env_logger::init();
//! log::info!("Starting shared_state_bot...");
//!
//! let bot = Bot::from_env().auto_send();

View file

@ -10,7 +10,7 @@
//!
//! # #[tokio::main]
//! # async fn main() {
//! teloxide::enable_logging!();
//! pretty_env_logger::init();
//! log::info!("Starting dices_bot...");
//!
//! let bot = Bot::from_env().auto_send();