Add event data parameters to event log xml#41
Conversation
|
Is there a way to merge this in and to release a new version? Would really like to see all properties as well! |
| { | ||
| const string ApplicationLogName = "Application"; | ||
| const int MaximumPayloadLengthChars = 31839; | ||
| const int MaximumPayloadLengthChars = 31639; |
There was a problem hiding this comment.
The EventLog.WriteEntry documentation says
The message string is longer than 31,839 bytes (32,766 bytes on Windows operating systems before Windows Vista).
Is this incorrect?
There was a problem hiding this comment.
After running the UsingSuperLongLogMessageWorks test repeatedly while tweaking the MaximumPayloadLengthChars value I figured the actual max length is 31718 on Windows 10. Can you confirm this observation?
There was a problem hiding this comment.
@0xced This PR would be a very nice improvement so I jumped in and ran the UsingSuperLongLogMessageWorks test too, Win 11 22H2.
The projects dev branch the actual max length is 31701 for me. On mcolleras PR it only worked up to 31698.
Not sure if this is helpful or just making it worse. :)
There was a problem hiding this comment.
🤦♂️ Nobody seems to know what the actual limit is, see also dotnet/dotnet-api-docs#9999 (comment)
Not sure what's the best course of action.
There was a problem hiding this comment.
Fun fact, the dotnet EventLog extension library for DI sets it to 31839 too:
|
Anyone still keen on this PR? I can review/merge, but it needs a description - what does this fix/improve, and are there any caveats e.g. for backwards compatibility. A screenshot with an example message would also help considerably. Cheers! |
No description provided.