You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by bo...@apache.org on 2011/09/12 13:05:50 UTC

svn commit: r1169688 - /logging/log4net/trunk/src/Appender/EventLogAppender.cs

Author: bodewig
Date: Mon Sep 12 11:05:49 2011
New Revision: 1169688

URL: http://svn.apache.org/viewvc?rev=1169688&view=rev
Log:
Allow EventId to be specified by a property that is neither a string nor an int in EventLogAppender.  LOG4NET-129

Modified:
    logging/log4net/trunk/src/Appender/EventLogAppender.cs

Modified: logging/log4net/trunk/src/Appender/EventLogAppender.cs
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Appender/EventLogAppender.cs?rev=1169688&r1=1169687&r2=1169688&view=diff
==============================================================================
--- logging/log4net/trunk/src/Appender/EventLogAppender.cs (original)
+++ logging/log4net/trunk/src/Appender/EventLogAppender.cs Mon Sep 12 11:05:49 2011
@@ -350,6 +350,10 @@ namespace log4net.Appender
 				else
 				{
 					string eventIDPropertyString = eventIDPropertyObj as string;
+                    if (eventIDPropertyString == null)
+                    {
+                        eventIDPropertyString = eventIDPropertyObj.ToString();
+                    }
 					if (eventIDPropertyString != null && eventIDPropertyString.Length > 0)
 					{
 						// Read the string property into a number