Author: bodewig
Date: Sun Nov 6 09:53:14 2016
New Revision: 1768299
URL: http://svn.apache.org/viewvc?rev=1768299&view=rev
Log:
LOG4NET-529 don't assign m_compositeProperties before it is complete
Modified:
logging/log4net/trunk/src/Core/LoggingEvent.cs
Modified: logging/log4net/trunk/src/Core/LoggingEvent.cs
URL:
http://svn.apache.org/viewvc/logging/log4net/trunk/src/Core/LoggingEvent.cs?rev=1768299&r1=1768298&r2=1768299&view=diff
==============================================================================
--- logging/log4net/trunk/src/Core/LoggingEvent.cs (original)
+++ logging/log4net/trunk/src/Core/LoggingEvent.cs Sun Nov 6 09:53:14 2016
@@ -1316,23 +1316,23 @@ namespace log4net.Core
private void CreateCompositeProperties()
{
- m_compositeProperties = new CompositeProperties();
+ CompositeProperties compositeProperties = new
CompositeProperties();
if (m_eventProperties != null)
{
- m_compositeProperties.Add(m_eventProperties);
+ compositeProperties.Add(m_eventProperties);
}
#if !(NETCF || NETSTANDARD1_3)
PropertiesDictionary logicalThreadProperties =
LogicalThreadContext.Properties.GetProperties(false);
if (logicalThreadProperties != null)
{
-
m_compositeProperties.Add(logicalThreadProperties);
+
compositeProperties.Add(logicalThreadProperties);
}
#endif
PropertiesDictionary threadProperties =
ThreadContext.Properties.GetProperties(false);
if (threadProperties != null)
{
- m_compositeProperties.Add(threadProperties);
+ compositeProperties.Add(threadProperties);
}
// TODO: Add Repository Properties
@@ -1341,9 +1341,10 @@ namespace log4net.Core
PropertiesDictionary eventProperties = new
PropertiesDictionary();
eventProperties[UserNameProperty] = UserName;
eventProperties[IdentityProperty] = Identity;
- m_compositeProperties.Add(eventProperties);
+ compositeProperties.Add(eventProperties);
-
m_compositeProperties.Add(GlobalContext.Properties.GetReadOnlyProperties());
+
compositeProperties.Add(GlobalContext.Properties.GetReadOnlyProperties());
+ m_compositeProperties = compositeProperties;
}
private void CacheProperties()
@@ -1547,4 +1548,4 @@ namespace log4net.Core
#endregion
}
-}
\ No newline at end of file
+}