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

chore: Add extra logging for policy selection error #888

Merged
merged 1 commit into from
Nov 19, 2021

Conversation

sandrask
Copy link
Contributor

Add extra logging for policy selection error

Closes #887

Signed-off-by: Sandra Vrtikapa sandra.vrtikapa@securekey.com

Add extra logging for policy selection error

Closes trustbloc#887

Signed-off-by: Sandra Vrtikapa <sandra.vrtikapa@securekey.com>
@cla-bot cla-bot bot added the cla-signed label Nov 19, 2021
@codecov
Copy link

codecov bot commented Nov 19, 2021

Codecov Report

Merging #888 (5830385) into main (54bb691) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #888      +/-   ##
==========================================
+ Coverage   89.43%   89.49%   +0.05%     
==========================================
  Files         156      156              
  Lines       13843    13845       +2     
==========================================
+ Hits        12381    12391      +10     
+ Misses        901      894       -7     
+ Partials      561      560       -1     
Impacted Files Coverage Δ
pkg/anchor/witness/policy/policy.go 98.70% <100.00%> (+0.01%) ⬆️
...pub/service/inbox/httpsubscriber/httpsubscriber.go 100.00% <0.00%> (+9.87%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 54bb691...5830385. Read the comment docs.

@fqutishat fqutishat merged commit 8e6f200 into trustbloc:main Nov 19, 2021
if err != nil {
return nil, nil, fmt.Errorf("select batch witnesses as per policy: %w", err)
return nil, nil, fmt.Errorf("select batch witnesses based on witnesses%s, eligible%s, common%s, total[%d], policy[%s]: %w", //nolint:lll
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the lack of spaces between the words and %s may make this hard to read.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please disregard - I see now that they get printed with [] characters which makes them stand out

if err != nil {
return nil, nil, fmt.Errorf("select system witnesses as per policy: %w", err)
return nil, nil, fmt.Errorf("select system witnesses based on witnesses%s, eligible%s, common%s, total[%d], policy[%s]: %w", //nolint:lll
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add extra logging for select witnesses error
3 participants