Skip to content

🔍 Improve debug connection trace output#648

Open
nevans wants to merge 1 commit intomasterfrom
improved-debug-trace-output
Open

🔍 Improve debug connection trace output#648
nevans wants to merge 1 commit intomasterfrom
improved-debug-trace-output

Conversation

@nevans
Copy link
Copy Markdown
Collaborator

@nevans nevans commented Apr 20, 2026

This uses String#dump to print out control characters legibly, which makes the CRLF line endings explicit and enables reliable copy/pasting of logged data for tests or debugging.

This also improves how sent/rcvd data is interleaved (in my opinion).

Note that, because client-sent data is generally in the main/application thread(s) (inside #synchronize), and server responses are received in the server thread (not synchronized), this did have a threading race condition. So this updated version uses synchronize to log the server responses.

This uses String#dump to print out control characters legibly, whic
makes the CRLF line endings explicit and enables reliable copy/pasting
of logged data for tests or debugging.

This also improves how sent/rcvd data is interleaved (in my opinion).

Note that, because client-sent data is generally in the main/application
thread(s) (inside `#synchronize`), and server responses are received in
the server thread (_not_ synchronized), this did have a threading race
condition.  So this updated version uses `synchronize` to log the server
responses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant