-
Notifications
You must be signed in to change notification settings - Fork 47
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
feat: add logging to DIP components #630
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice changes.
Two picky comments. Would be charming if some logs are more consistent. Some start with Failed and some others have the failed in the middle of the sentence, but nothing which should block this PR to be merged.
I assume the integration-tests are currently failing because we are in an intermediate state. I tried to fix them and I get the error Transport("NoChannel").
These errors are probably resolved, once we accept the channel request from HydraDx. Nevertheless, some changes are required. The KILT token registration is no longer necessary. I have fixed them already and will create a PR, once the referendum is through.
Fixes KILTprotocol/ticket#3128. I introduced different new logging targets. For the deposit storage and relay store pallet, which are not technically part of the DIP protocol, the target is a standalone one. For the other things, meaning DIP pallets and DIP provider/consumer components, the log targets have the following structure: `"dip::<provider>|<consumer>::<type_name>"`. So filtering provider logs would require `RUST_LOG=dip::provider=info`, for instance. Most of the logs are `info` level, with some `error` where we return `Internal` errors or errors coalesced into a `u8` value, and a couple of `trace` for the less important stuff to show.
Fixes https://github.com/KILTprotocol/ticket/issues/3128.
I introduced different new logging targets. For the deposit storage and relay store pallet, which are not technically part of the DIP protocol, the target is a standalone one. For the other things, meaning DIP pallets and DIP provider/consumer components, the log targets have the following structure:
"dip::<provider>|<consumer>::<type_name>"
. So filtering provider logs would requireRUST_LOG=dip::provider=info
, for instance. Most of the logs areinfo
level, with someerror
where we returnInternal
errors or errors coalesced into au8
value, and a couple oftrace
for the less important stuff to show.