traffic_ctl - JSONRPC: make sure we display the error regardless of the formatting type.#8852
Merged
brbzull0 merged 1 commit intoapache:10-Devfrom May 18, 2022
Conversation
SolidWallOfCode
approved these changes
May 16, 2022
Member
SolidWallOfCode
left a comment
There was a problem hiding this comment.
What happened to pretty printing? Is that always the case now?
cmcfarlen
reviewed
May 16, 2022
include/shared/rpc/RPCRequests.h
Outdated
| for (; iter != std::end(err.data); ++iter) { | ||
| os << "---\n"; | ||
| my_print(*iter); | ||
| os << "- [" << iter->first << "] " << iter->second << '\n'; |
Contributor
There was a problem hiding this comment.
Since the interleaved --- is no longer being printed, this could just be a simple for (auto it: err.data) ... loop.
Contributor
Author
There was a problem hiding this comment.
True. Missed that, thanks a lot, fixed now.
…he formatting type. This also changes the output style for a better quick read.
8e35b3d to
9d7ed37
Compare
Contributor
Author
No, it still work for cases that it's implemented and you request it, but the pretty printing is more for message ouitput( |
JosiahWI
pushed a commit
to JosiahWI/trafficserver
that referenced
this pull request
Jul 19, 2023
…he formatting type. (apache#8852) (apache#682) - This also changesthe output style for a better quick read. (cherry picked from commit d1313ea)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While working on a different pr I found out that some error weren't displayed by
traffic_ctlas it was before the jsonrpc change, this change fixes this and also changes the output style for a "better" quick read, more like it was before jsonrpc.Now this prints the main error and in a second level the more specifics. There could be more than one second level error.