-
Notifications
You must be signed in to change notification settings - Fork 181
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
Add etw UnicodeStringField #211
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. can you commit with -s
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm also, same ask as above though. Can do git commit --amend --sign-off
and repush.
// UnicodeStringArray adds an array of UTF-16 strings to the event. | ||
func UnicodeStringArray(name string, values []string) FieldOpt { | ||
return func(em *eventMetadata, ed *eventData) { | ||
em.writeArray(name, inTypeUnicodeString, outTypeString, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want the out type here? It looks like TraceLoggingWideString
in TraceLoggingProvider.h
just uses TlgInUNICODESTRING
with no out type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see below.
724e7f4
to
48d3521
Compare
@pavelbazika |
Signed-off-by: Pavel Bazika <[email protected]>
48d3521
to
fc43157
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good except for the linter (and for some reason the signing check expects your email to be different):
Commit sha: fc43157, Author: Pavel Bazika, Committer: Pavel Bazika; Expected "Pavel Bazika [email protected]", but got "Pavel Bazika [email protected]".
binary.Write(&ed.buffer, binary.LittleEndian, unicode) | ||
ed.buffer.Write([]byte{0, 0}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to suppress the linter on error checking (or you can add a //nolint:errcheck
directive)
binary.Write(&ed.buffer, binary.LittleEndian, unicode) | |
ed.buffer.Write([]byte{0, 0}) | |
_ = binary.Write(&ed.buffer, binary.LittleEndian, unicode) | |
_, _ = ed.buffer.Write([]byte{0, 0}) |
Closing old PR. Please reactivate if this is still relevant. |
Allow to send UTF-16 encoded message. It's the only missing part needed for writing messages with local characters into event log via this library, when string is specified as win:UnicodeString in instrumentation manifest (which cannot be changed).
UnicodeStringArray
is there only for completeness from my point of view.