mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-19 06:59:22 +01:00
f89b22bbea
## Summary Log filters keyed by a module path, such as `"project::lsp_store": "debug"`, are stored separately from scope filters. `refresh_from_settings` computed the most verbose enabled level from the scope filters only. Records more verbose than that level are rejected before any filter is consulted, so a module filter could not enable `debug` or `trace` records unless a scope filter or `ZED_LOG` already allowed that level. The level now includes module filters. ## Testing `cargo test -p zlog` passes. `test_refresh_from_settings_with_module_filter` is new and fails without the fix. ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [x] Tests cover the new or changed behavior. Release Notes: - Fixed `log` settings keyed by module path (such as `project::lsp_store`) not enabling `debug` or `trace` logs
Zlog
Use the ZED_LOG environment variable to control logging output for Zed
applications and libraries. The variable accepts a comma-separated list of
directives that specify logging levels for different modules (crates). The
general format is for instance:
ZED_LOG=info,project=debug,agent=off
- Levels can be one of:
off/none,error,warn,info,debug, ortrace. - You don't need to specify the global level, default is
tracein the crate andinfoset byRUST_LOGin Zed.