-
Notifications
You must be signed in to change notification settings - Fork 29
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 event data parameters to event log xml #41
base: dev
Are you sure you want to change the base?
Conversation
Is there a way to merge this in and to release a new version? Would really like to see all properties as well! |
@@ -31,7 +31,7 @@ namespace Serilog.Sinks.EventLog | |||
public class EventLogSink : ILogEventSink | |||
{ | |||
const string ApplicationLogName = "Application"; | |||
const int MaximumPayloadLengthChars = 31839; | |||
const int MaximumPayloadLengthChars = 31639; |
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤦♂️ 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.
No description provided.