Skip to content
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

Extend frame logging to optionally decode transfer payloads as AMQP #347

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

astitcher
Copy link
Member

You can turn on this extra frame logging by setting the 'frame+' log level. This can usually be done by setting the PN_LOG environment variable to 'frame+'

This PR also contains changes to the recent AMQP value dump code so that it uses a fixed size string output buffer instead of using the pn_string_t type which will grow indefinitely.

I'd be very interested in people using this extra frame trace to see whether they think it's useful.

@astitcher
Copy link
Member Author

In response to some feedback I've made the full frame logging the default (and only) behaviour when frame tracing is turned on (PN_LOG=frame). The extra control wasn't very useful, at least for this proof of concept.

Now that null values are not printed in frame traces the traces become significantly less cluttered and more useful than before.

@astitcher
Copy link
Member Author

My intention is to split out the fixed string work from this branch as it isn't really the focus of this WIP, but an independently useful change which gos to bounding the size of the logging buffers that be received by a logger sink.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant