logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1169688 - /logging/log4net/trunk/src/Appender/EventLogAppender.cs
Date Mon, 12 Sep 2011 11:05:50 GMT
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



Mime
View raw message