Skip to main content

Module module_levels

Module module_levels 

Source
Expand description

Per-module log level overrides from config. Per-module log level overrides configured from YAML/config.

Translates a HashMap<String, String> of module → level entries into a tracing_subscriber::EnvFilter so that noisy dependencies can be silenced without changing the global level.

§Example

use std::collections::HashMap;
use rskit_logging::module_levels::build_env_filter;

let mut levels = HashMap::new();
levels.insert("sqlx".to_string(), "warn".to_string());
let filter = build_env_filter("info", &levels);
assert!(format!("{filter}").contains("sqlx"));

Structs§

ModuleLevelsConfig
Per-module log level overrides.

Functions§

build_directives
Build the raw directives string without checking RUST_LOG.
build_env_filter
Build an EnvFilter from a base level and per-module overrides.