fix: attempt at making logging less spammy

This commit is contained in:
əlemi 2023-01-22 17:03:33 +01:00
parent 374765bd19
commit 3b7951154f
No known key found for this signature in database
GPG key ID: BBCBFE5D7244634E

View file

@ -9,8 +9,10 @@ use clap::Parser;
use axum::{Router, routing::{get, post}, response::IntoResponse, Json, http::StatusCode, extract::State}; use axum::{Router, routing::{get, post}, response::IntoResponse, Json, http::StatusCode, extract::State};
use sea_orm::{EntityTrait, DatabaseConnection, Database, ActiveValue::NotSet, Set}; use sea_orm::{EntityTrait, DatabaseConnection, Database, ActiveValue::NotSet, Set};
use tokio::sync::Mutex; use tokio::sync::Mutex;
use tracing_subscriber::filter::filter_fn;
use uuid::Uuid; use uuid::Uuid;
use tracing::info; use tracing_subscriber::prelude::*;
use tracing::{info, metadata::LevelFilter};
use crate::routes::{ use crate::routes::{
auth::{authenticate, validate, refresh}, auth::{authenticate, validate, refresh},
@ -54,7 +56,10 @@ pub struct AppState {
#[tokio::main] #[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> { async fn main() -> Result<(), Box<dyn std::error::Error>> {
tracing_subscriber::fmt::init(); tracing_subscriber::registry()
.with(LevelFilter::INFO)
.with(filter_fn(|x| x.target() != "sqlx::query"))
.init();
let cfg = ConfigArgs::parse(); let cfg = ConfigArgs::parse();