# zlog: Module-level configuration and other improvements \(\#29161\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/d13cd007a263dc9b1388291c8832f0f6430d6f4a)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: d13cd007a263dc9b1388291c8832f0f6430d6f4a

Requested commit: d13cd007a263dc9b1388291c8832f0f6430d6f4a

Commit: d13cd007a263dc9b1388291c8832f0f6430d6f4a

Tree: e582cc957ea59ceda3a863d38b40fce1e2fede29

Author: Ben Kunkle

Committer: GitHub

## Message

```
zlog: Module-level configuration and other improvements (#29161)

Various improvements to `zlog` including:

- Enable filtering by module (reproducing `env_logger` behavior) both
through env and settings.
- Note: filtering by module currently does not account for parent module
configuration, but does account for crate configuration.
i.e. `crate=trace` will enable `TRACE` messages in `crate::a` and
`crate::a::b` modules, but `crate::a=trace` will not enable trace
messages in module `crate::a::b`
- Implementing the `Log` trait for `zlog::Logger` to support gradual
transition and evaluate tradeoffs of always going through `log` crate.
- Added the ability to turn off logging for a specific filter (module or
scope) completely by setting it to `off` (in env: `crate::a=off`, in
settings: `"project.foo": "off"`)
- Made it so the `zlog::scoped!` macro can be used in constant
expressions, so scoped loggers can be declared as global constants

Release Notes:

- N/A
```

## Parents

- [f8ac6eef75b6797178990c57000c5b0cbc651694](https://git.cafe/gitcafe/zed/commit/f8ac6eef75b6797178990c57000c5b0cbc651694?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/d13cd007a263dc9b1388291c8832f0f6430d6f4a?format=markdown)
