Suppress maxminddb DEBUG logs in tracing filter

maxminddb's deserializer emits high-volume DEBUG traces for every field
decoded during a GeoIP lookup. Adding a target-specific directive
(maxminddb=warn) keeps those logs silent while leaving the rest of the
application at its configured level.

https://claude.ai/code/session_01Wen51749mAnwBEfh7XmvUw
This commit is contained in:
Claude 2026-05-19 12:20:11 +00:00
parent 2c0a4a8b4d
commit 3bfcbd9727
No known key found for this signature in database

View File

@ -39,10 +39,14 @@ impl Logging {
Level::INFO
};
let env_filter = EnvFilter::from_default_env()
.add_directive(level.into())
.add_directive("maxminddb=warn".parse().expect("valid directive"));
tracing_subscriber::registry()
.with(stdout_layer)
.with(file_layer)
.with(EnvFilter::from_default_env().add_directive(level.into()))
.with(env_filter)
.init();
Ok(())