zed/crates/util
Max Brunsfeld 97159bd88d
Associate logs from log_err with the calling crate (#13617)
Now, when you selectively enable logs from particular crates with
`RUST_LOG=call,worktree`, logs created via `log_err` calls in those
crates get correctly enabled. Previously, they were all attributed to
the `util` crate, because they used the normal logging macros, which
implicitly insert the current crate name.

This relies on the regularity of our directory naming. Rust's
`track_caller` feature allows you to obtain the file system path of the
caller, but not its rust module path, so I'm inferring the crate name
from the file system path (which I believe is always valid, in our
codebase).

Release Notes:

- N/A
2024-06-27 17:03:47 -07:00
..
src Associate logs from log_err with the calling crate (#13617) 2024-06-27 17:03:47 -07:00
Cargo.toml util: Replace lazy_static! with OnceLock (#13215) 2024-06-18 12:44:58 -04:00
LICENSE-APACHE chore: Add crate licenses. (#4158) 2024-01-23 16:56:22 +01:00