Merge
This commit is contained in:
parent
240ee00d6b
commit
e2bd82d9ac
22
src/main.rs
22
src/main.rs
|
@ -6,8 +6,26 @@ use std::{
|
||||||
use tokio::sync::mpsc::channel;
|
use tokio::sync::mpsc::channel;
|
||||||
|
|
||||||
use notify::{Config, RecommendedWatcher, RecursiveMode, Watcher};
|
use notify::{Config, RecommendedWatcher, RecursiveMode, Watcher};
|
||||||
mod observe;
|
|
||||||
mod prelude;
|
mod observe {
|
||||||
|
use tracing::level_filters::LevelFilter;
|
||||||
|
use tracing_subscriber::EnvFilter;
|
||||||
|
|
||||||
|
pub fn setup_logging() {
|
||||||
|
color_eyre::install().expect("Failed to install color_eyre");
|
||||||
|
|
||||||
|
let filter = EnvFilter::builder()
|
||||||
|
.with_default_directive(LevelFilter::TRACE.into())
|
||||||
|
.parse_lossy("info,chatbot=trace");
|
||||||
|
|
||||||
|
tracing_subscriber::fmt().with_env_filter(filter).init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mod prelude {
|
||||||
|
#![allow(unused_imports)]
|
||||||
|
pub use tracing::{debug, error, info, warn};
|
||||||
|
}
|
||||||
|
|
||||||
use axum::{serve, Router};
|
use axum::{serve, Router};
|
||||||
use tower_http::services::ServeDir;
|
use tower_http::services::ServeDir;
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
use tracing::level_filters::LevelFilter;
|
|
||||||
use tracing_subscriber::EnvFilter;
|
|
||||||
|
|
||||||
pub fn setup_logging() {
|
|
||||||
color_eyre::install().expect("Failed to install color_eyre");
|
|
||||||
|
|
||||||
let filter = EnvFilter::builder()
|
|
||||||
.with_default_directive(LevelFilter::TRACE.into())
|
|
||||||
.parse_lossy("info,chatbot=trace");
|
|
||||||
|
|
||||||
tracing_subscriber::fmt().with_env_filter(filter).init();
|
|
||||||
}
|
|
|
@ -1,2 +0,0 @@
|
||||||
#![allow(unused_imports)]
|
|
||||||
pub use tracing::{debug, error, info, warn};
|
|
Loading…
Reference in a new issue