Resolve LogSettings defaults from configuration - #569
Open
samc24 wants to merge 1 commit into
Open
Conversation
Signed-off-by: Sameer Chaturvedi <sameerc@mit.edu>
This was referenced Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prototype for #445: move hardcoded tunables into the layered configuration, using
LogSettingsas the proof of pattern.file_leveland the console thresholds (warning_threshold,success_threshold,info_threshold) now default toNoneand are resolved in__post_init__from a new[default.log]section inconfig.toml.DISPY_LOG__*environment variable, then~/.config/disruption-py/user.toml, then the repoconfig.toml. The env and user-file layers come for free from the existing Dynaconf setup, e.g.DISPY_LOG__WARNING_THRESHOLD=2000.console_levelis deliberately left alone since itsNonealready means "derive the level from the shot count", andfile_pathis left alone since it is a computed default that needs its own design call.get_shots_data, so thedefaultconfig environment is the right (and only possible) source. Per-machine log overrides are out of scope.tests/test_config.py. The per-run config dump now includes the effective log section.If this pattern looks right, the same treatment can roll out to the rest of the hardcoded values inventoried in #445.