Skip to content

Commit

Permalink
WIP: Extend frame tracing to decode the performative payloads
Browse files Browse the repository at this point in the history
This should probably only try to decode the transfer performative. But
currently the frame dumper has no way to feed back anything about the
AMQP value it just dumped.
  • Loading branch information
astitcher committed Dec 23, 2021
1 parent 93daef0 commit 393c3f3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions c/src/core/logger.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ void pni_logger_log_msg_frame(pn_logger_t *logger, pn_log_subsystem_t subsystem,
va_end(ap);
size_t psize = pni_value_dump(frame, &output);
pn_bytes_t payload = {.size=frame.size-psize, .start=frame.start+psize};
while (payload.size>0 && psize>0) {
pn_fixed_string_append(&output, pn_string_const(" ", 1));
psize = pni_value_dump(payload, &output);
payload = (pn_bytes_t){.size=payload.size-psize, .start=payload.start+psize};
}
if (payload.size>0) {
pn_fixed_string_addf(&output, " (%zu) ", payload.size);
pn_fixed_string_quote(&output, payload.start, payload.size);
Expand Down

0 comments on commit 393c3f3

Please sign in to comment.