Description
In log4net.Appender.EventLogAppender:
The MAX_EVENTLOG_MESSAGE_SIZE field is initiated before MAX_EVENTLOG_MESSAGE_SIZE_DEFAULT and MAX_EVENTLOG_MESSAGE_SIZE_VISTA_OR_NEWER. Therefore, when MAX_EVENTLOG_MESSAGE_SIZE is set during construction, MAX_EVENTLOG_MESSAGE_SIZE_DEFAULT and MAX_EVENTLOG_MESSAGE_SIZE_VISTA_OR_NEWER are zero.
The end result is that a TargetInvocationException occurs in log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(System.Xml.XmlElement appenderElement) (Line 303) and that the message recorded in the event log is empty.
Attachments
Issue Links
- is broken by
-
LOG4NET-360 EventLogAppender can corrupt the event log on Windows Vista and higher if the string is longer than 31839 bytes
- Resolved