-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading report #82
Comments
Hi! Thanks for your issue! That is definitively one valid thing to have, and I believe we have this (almost): With https://github.com/matthiasbeyer/config-rs-ng/blob/master/src/config/layers.rs#L62 And with the What I see missing is a way to iterate over all layers of a Which I think we can add. Edit: Ah, what also would be missing is a way to iterate all values of a |
Thanks for the answer! Yeah, from a quick look it's the "visiting" part that's currently missing. |
An extremely common issue when working with hierarchical configuration is understanding where values are coming from.
In particular, quickly determining if a specific value is coming from a specific source.
What I'd like to have is something I'm calling a "loading report": an iterator that touches all values that have been loaded and tells you "X was loaded from source Y, which overrode the value set by source Z".
This could be used to emit the report as telemetry data (e.g. a structured log record).
The current
config
crate does not help here, because the different layers are eagerly merged.figment
is almost equally unhelpful, because you'd have to wrap every single field inTagged
(+find a way to implement a visitor).Is this something you'd be interested to support in the next iteration of
config
?The text was updated successfully, but these errors were encountered: