Author: bodewig Date: Tue Nov 29 16:27:21 2011 New Revision: 1207948 URL: http://svn.apache.org/viewvc?rev=1207948&view=rev Log: make sure LogicalThreadContext really follows logical thread on .NET2+. LOG4NET-317 Modified: logging/log4net/trunk/src/Util/LogicalThreadContextProperties.cs Modified: logging/log4net/trunk/src/Util/LogicalThreadContextProperties.cs URL: http://svn.apache.org/viewvc/logging/log4net/trunk/src/Util/LogicalThreadContextProperties.cs?rev=1207948&r1=1207947&r2=1207948&view=diff ============================================================================== --- logging/log4net/trunk/src/Util/LogicalThreadContextProperties.cs (original) +++ logging/log4net/trunk/src/Util/LogicalThreadContextProperties.cs Tue Nov 29 16:27:21 2011 @@ -208,7 +208,11 @@ namespace log4net.Util #endif private static PropertiesDictionary GetCallContextData() { +#if NET_2_0 + return CallContext.LogicalGetData(c_SlotName) as PropertiesDictionary; +#else return CallContext.GetData(c_SlotName) as PropertiesDictionary; +#endif } /// @@ -225,7 +229,11 @@ namespace log4net.Util #endif private static void SetCallContextData(PropertiesDictionary properties) { +#if NET_2_0 + CallContext.LogicalSetData(c_SlotName, properties); +#else CallContext.SetData(c_SlotName, properties); +#endif } #endregion