-
Notifications
You must be signed in to change notification settings - Fork 163
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
Fix sciond logging for processing path replies. #3021
Conversation
- The logger does not expect an `error` after the string, so removing `nil`. - The logger does not do a good job with `[]error`, so created `common.FmtErrors` to handle this. Before: ``` 2019-08-21 09:01:33.830842+0000 [WARN] Failed to verify reply debug_id=747f80c4 trace_id=64dc60702aa9bf7 LOG15_ERROR="Key(<nil>) is not a string: <nil>" LOG15_ERROR="Key([]error) is not a string: [Failed to verify seg seg="55c11074ec66 2019-08-21 09:01:31+0000 1-ff00:0:110 1>41 1-ff00:0:111" DEBUGTHISTHING 2 Failed to verify seg seg="55c11074ec66 2019-08-21 09:01:31+0000 1-ff00:0:110 1>41 1-ff00:0:111" DEBUGTHISTHING 2]" LOG15_ERROR="Normalized odd number of arguments by adding nil" ``` After: ``` 2019-08-20 15:59:05.693430+0000 [WARN] Failed to verify reply debug_id=e544675c trace_id=6963201a9432fbae errors= > Failed to verify seg seg="55c11074ec66 2019-08-20 15:59:01+0000 1-ff00:0:110 1>41 1-ff00:0:111" > DEBUGTHISTHING 2 > Failed to verify seg seg="55c11074ec66 2019-08-20 15:59:01+0000 1-ff00:0:110 1>41 1-ff00:0:111" > DEBUGTHISTHING 2 ```
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.
Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @kormat)
go/lib/common/errors.go, line 189 at r1 (raw file):
// FmtErrors formats a slice of errors for logging. func FmtErrors(es []error) string { s := make([]string, 0)
make([]string, 0, len(es))
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.
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @lukedirtwalker)
go/lib/common/errors.go, line 189 at r1 (raw file):
Previously, lukedirtwalker (Lukas Vogel) wrote…
make([]string, 0, len(es))
Done. ish.
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.
Reviewed 1 of 1 files at r2, 1 of 1 files at r3.
Reviewable status: complete! all files reviewed, all discussions resolved
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.
Reviewable status: complete! all files reviewed, all discussions resolved
error
after the string, so removingnil
.[]error
, so createdcommon.FmtErrors
to handle this.Before:
After:
This change is