Silencing logs a bit

This commit is contained in:
Imbus 2024-03-06 07:55:31 +01:00
parent 9e302fc54a
commit d12bd9aa99

View file

@ -20,7 +20,11 @@ use util::hex_string;
#[actix_web::main]
async fn main() -> std::io::Result<()> {
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("debug")).init();
let mut builder = env_logger::Builder::new();
builder
.filter(None, log::LevelFilter::Debug)
.filter_module("sqlx", log::LevelFilter::Warn)
.init();
let data = ServerState::new().await;
let capt_db = CaptchaState::new();
@ -49,7 +53,7 @@ async fn main() -> std::io::Result<()> {
App::new()
.wrap(cors)
.wrap(middleware::Compress::default())
.wrap(middleware::Logger::default())
.wrap(middleware::Logger::new("%s %r"))
.wrap(middleware::NormalizePath::trim())
.service(
scope("/api")