Skip to content
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

[suggestion] Trace configuration parameters resolution #3502

Closed
0x009922 opened this issue May 21, 2023 · 2 comments
Closed

[suggestion] Trace configuration parameters resolution #3502

0x009922 opened this issue May 21, 2023 · 2 comments
Assignees
Labels
config-changes Changes in configuration and start up of the Iroha Enhancement New feature or request iroha2-dev The re-implementation of a BFT hyperledger in RUST QA-confirmed This bug is reproduced and needs a fix

Comments

@0x009922
Copy link
Contributor

0x009922 commented May 21, 2023

Feature request

When something goes wrong in configuration, it is essential to trace where a particular parameter data came from. E.g. you have some parameters specified in ENV, some in JSON, and when you get an error, you want to know in which place you should fix it.

It might be also useful to log the resolution process on TRACE/DEBUG level so you can inspect what data is loaded from where, what is overwritten by what, etc.

And of course, when you have a configuration error, you should know the field location as precise as possible:

@0x009922 0x009922 added Enhancement New feature or request iroha2-dev The re-implementation of a BFT hyperledger in RUST config-changes Changes in configuration and start up of the Iroha labels May 21, 2023
@appetrosyan
Copy link
Contributor

Best thing we can do is add println statements whenever we override one parameter with another.

The reason why this couldn't be iroha_logger::debug! for example is because logging is also controlled by the configuration and might not be initialised at all times. Plus this happens once in the early init, so there's not many reasons why prinltn would be a bad idea.

@0x009922
Copy link
Contributor Author

Closed by #4456

@timofeevmd timofeevmd self-assigned this May 28, 2024
@timofeevmd timofeevmd added the QA-confirmed This bug is reproduced and needs a fix label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
config-changes Changes in configuration and start up of the Iroha Enhancement New feature or request iroha2-dev The re-implementation of a BFT hyperledger in RUST QA-confirmed This bug is reproduced and needs a fix
Projects
None yet
Development

No branches or pull requests

3 participants