Skip to content

Fix a few issues with TRACE2 output #1909

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mjcheetham
Copy link
Collaborator

I noticed a few problems with the TRACE2 support when writing to a pipe/socket. The handling of the trace2.eventTarget setting to get the correct pipe name/socket file path was incorrect resulting in names like "pipe\foobar" when given "//./pipe/foobar" on Windows, when it should be "foobar".

Also the event field name 'format' is incorrect; it should be 'fmt'.

There are a few bugs in the way we read a pipe or socket name for the
TRACE2 event target. We do not correctly trim the \\.\pipe\ prefix on
Windows, if present. On Unix we do not correctly strip the af_unix:
prefix correctly if a socket file path contains a ':'.

Let's fix this!

Signed-off-by: Matthew John Cheetham <[email protected]>
In a message that is formatted/parameterised, we incorrectly use the
field name of 'format' rather than 'fmt'. Fix this.

Signed-off-by: Matthew John Cheetham <[email protected]>
Copy link
Collaborator

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

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.

2 participants