Update log handler

This commit is contained in:
2023-08-09 02:27:17 +02:00
parent 556b447c82
commit 231e88c690
8 changed files with 108 additions and 57 deletions

View File

@@ -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::{

View File

@@ -13,6 +13,7 @@ use teloxide::{
};
use tokio::time::sleep;
use tokio_util::compat::FuturesAsyncReadCompatExt;
use tracing::log;
use crate::{
bots::{

View File

@@ -5,6 +5,7 @@ use smartstring::alias::String as SmartString;
use serde::de::DeserializeOwned;
use smallvec::SmallVec;
use tracing::log;
use crate::config;

View File

@@ -2,6 +2,7 @@ use std::error::Error;
use serde_json::json;
use teloxide::prelude::*;
use tracing::log;
use crate::config;

View File

@@ -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;

View File

@@ -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();