Actix remove logging messages

I have searched for Logger configurations that remove specific log messages but I can't find a solution to remove TRACE messages which fill my logs and making everything confused.

Is there a solution to use .wrap(/*Logging config*/)?

I'm talking about removing TRACE [actix_http::h1::dispatcher] messages.

Looking at the docs,
https://actix.rs/docs/middleware#logging

Actix is probably configured to use env_logger. So, from the above doc you probably have something like this, which may mistakenly enable TRACE logging:

    env_logger::init_from_env(Env::default().default_filter_or("info"));

Or maybe TRACE logging is enabled via the RUST_LOG environment variable described here:
https://docs.rs/env_logger/0.11.1/env_logger/struct.Env.html

Just guessing, I don't use any of this.

1 Like