Simon Chester created LOG4NET-382:
-------------------------------------

             Summary: TargetInvocationException occurs because MESSAGE_SIZE 
fields in EventLogAppender are initialized in wrong order
                 Key: LOG4NET-382
                 URL: https://issues.apache.org/jira/browse/LOG4NET-382
             Project: Log4net
          Issue Type: Bug
          Components: Appenders
            Reporter: Simon Chester
            Priority: Blocker


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.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to