mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2026-03-03 07:00:53 +01:00
Update log handler
This commit is contained in:
@@ -6,6 +6,7 @@ use smartstring::alias::String as SmartString;
|
||||
use regex::Regex;
|
||||
use smallvec::SmallVec;
|
||||
use teloxide::{dispatching::UpdateFilterExt, dptree, prelude::*, adaptors::{Throttle, CacheMe}};
|
||||
use tracing::log;
|
||||
|
||||
use crate::bots::approved_bot::{
|
||||
services::{
|
||||
|
||||
@@ -13,6 +13,7 @@ use teloxide::{
|
||||
};
|
||||
use tokio::time::sleep;
|
||||
use tokio_util::compat::FuturesAsyncReadCompatExt;
|
||||
use tracing::log;
|
||||
|
||||
use crate::{
|
||||
bots::{
|
||||
|
||||
@@ -5,6 +5,7 @@ use smartstring::alias::String as SmartString;
|
||||
|
||||
use serde::de::DeserializeOwned;
|
||||
use smallvec::SmallVec;
|
||||
use tracing::log;
|
||||
|
||||
use crate::config;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ use std::error::Error;
|
||||
|
||||
use serde_json::json;
|
||||
use teloxide::prelude::*;
|
||||
use tracing::log;
|
||||
|
||||
use crate::config;
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ use teloxide::stop::{mk_stop_token, StopToken, StopFlag};
|
||||
use teloxide::update_listeners::{StatefulListener, UpdateListener};
|
||||
use tokio::sync::mpsc::{UnboundedSender, self};
|
||||
use tokio_stream::wrappers::UnboundedReceiverStream;
|
||||
use tracing::log;
|
||||
use url::Url;
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
@@ -7,8 +7,12 @@ mod config;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
tracing_subscriber::fmt()
|
||||
.with_target(false)
|
||||
.compact()
|
||||
.init();
|
||||
|
||||
let _guard = sentry::init(config::CONFIG.sentry_dsn.clone());
|
||||
pretty_env_logger::init();
|
||||
|
||||
let running = Arc::new(AtomicBool::new(true));
|
||||
let r = running.clone();
|
||||
|
||||
Reference in New Issue
Block a user