Repository navigation
Commit 65c8c66
authored
fix: logger to read from env map instead of std::env (#2235)
<!-- ELLIPSIS_HIDDEN -->
> [!IMPORTANT]
> Logger configuration now reads from an environment map, with updated
`ConfigValue` and `From` trait implementations, and new tests added.
>
> - **Behavior**:
> - Logger configuration now reads from an environment map instead of
directly from `std::env`.
> - Updates `ConfigValue` trait implementations for `LogLevelConfig`,
`JsonModeConfig`, `ColorModeConfig`, `LspConfig`, and
`MaxMessageLengthConfig` to support reading from a map.
> - Modifies `From` trait implementations for these configs to
prioritize map values over `std::env`.
> - **Tests**:
> - Adds tests in `logger.rs` to verify configuration reading from
environment maps and handling of invalid values.
> - Tests include `test_set_from_env_updates_config`,
`test_set_from_env_partial_update`, and
`test_set_from_env_invalid_values`.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=BoundaryML%2Fbaml&utm_source=github&utm_medium=referral)<sup>
for 30a0c69. You can
[customize](https://app.ellipsis.dev/BoundaryML/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->1 parent 78bec1a commit 65c8c66
1 file changed
Lines changed: 563 additions & 33 deletions
0 commit comments