Skip to content

Commit 393c3f3

Browse files
committed
WIP: Extend frame tracing to decode the performative payloads
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.
1 parent 93daef0 commit 393c3f3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

c/src/core/logger.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ void pni_logger_log_msg_frame(pn_logger_t *logger, pn_log_subsystem_t subsystem,
226226
va_end(ap);
227227
size_t psize = pni_value_dump(frame, &output);
228228
pn_bytes_t payload = {.size=frame.size-psize, .start=frame.start+psize};
229+
while (payload.size>0 && psize>0) {
230+
pn_fixed_string_append(&output, pn_string_const(" ", 1));
231+
psize = pni_value_dump(payload, &output);
232+
payload = (pn_bytes_t){.size=payload.size-psize, .start=payload.start+psize};
233+
}
229234
if (payload.size>0) {
230235
pn_fixed_string_addf(&output, " (%zu) ", payload.size);
231236
pn_fixed_string_quote(&output, payload.start, payload.size);

0 commit comments

Comments
 (0)