zlog: Fix incorrect assumption with filters (#29428)

- **do not assume logs over LEVEL_ENABLED_MAX_STATIC (the static global
log level) are enabled**
- **make it so filters that are just module names get overridden by
submodule path filters**

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Ben Kunkle 2025-04-25 12:11:58 -04:00 committed by GitHub
parent b28756ae3f
commit 136e83e0b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 19 deletions

View file

@ -200,7 +200,7 @@ macro_rules! crate_name {
pub mod private {
use super::*;
pub const fn extract_crate_name_from_module_path(module_path: &'static str) -> &'static str {
pub const fn extract_crate_name_from_module_path(module_path: &str) -> &str {
let mut i = 0;
let mod_path_bytes = module_path.as_bytes();
let mut index = mod_path_bytes.len();