-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
subscriber::fmt: print all error sources (#1460)
## Motivation Fixes #1347 ## Solution Change the format from `err=message, err: source1` to `err=message err.sources=[source1, source2, source3, ...]`, as suggested in #1347 (comment) (still leaving out the sources if there are none). ## Caveats Haven't changed the JSON formatter, since I'm not really sure about how to do that. The current format is `{.., "fields": {.., "err": "message"}}`, disregarding the sources entirely. We could change that to `{.., "fields": {.., "err": "message", "err.sources": ["source1", "source2", "source3", ..]}}`, which would keep backwards compatibility but looks pretty ugly. Another option would be `{.., "fields": {.., "err": {"message": "message", "sources": ["source1", "source2", "source3", ..]}}}` which leaves room for future expansion. Then again, that begs the question about why the first error is special, so maybe it ought to be `{.., "fields": {.., "err": {"message": "message", "source": {"message": "source1", "source": ..}}}}`. But that style of linked list is pretty annoying to parse, so maybe it ought to be flattened to `{.., "fields": {.., "err": [{"message": "message"}, {"message": "source1"}, ..]}}`? Co-authored-by: Eliza Weisman <eliza@buoyant.io>
- Loading branch information
Showing
4 changed files
with
53 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters