Skip to content

Commit 663fe1e

Browse files
author
Matt Brooks
committed
RT-3698 introduce LogicalThreadContext for log4net
1 parent 21e4254 commit 663fe1e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Src/StackifyLib.log4net/StackifyAppender.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Linq;
4+
using System.Threading;
45
using StackifyLib.Internal.Logs;
56
using StackifyLib.Models;
67
using StackifyLib.Utils;
@@ -321,7 +322,7 @@ private Dictionary<string, object> GetDiagnosticContextProperties()
321322
}
322323
}
323324
}
324-
#if NETFULL
325+
325326
foreach (string mdcKey in _LogicalThreadContextKeys)
326327
{
327328
object mdcValue = Apache_log4net.LogicalThreadContext.Properties[mdcKey];
@@ -355,8 +356,8 @@ private Dictionary<string, object> GetDiagnosticContextProperties()
355356
properties[mdcKey.ToLower()] = mdcValue;
356357
}
357358
}
358-
359359

360+
#if NETFULL
360361
foreach (string key in _CallContextKeys)
361362
{
362363
object value = System.Runtime.Remoting.Messaging.CallContext.LogicalGetData(key);
@@ -366,7 +367,6 @@ private Dictionary<string, object> GetDiagnosticContextProperties()
366367
properties[key.ToLower()] = value;
367368
}
368369
}
369-
370370
#endif
371371

372372
return properties;

Src/StackifyLib.log4net/StackifyLib.log4net.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
1414
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
1515
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
16-
<Version>2.1.0</Version>
16+
<Version>2.1.5</Version>
1717
<PackageLicenseUrl>https://github.com/stackify/stackify-api-dotnet/blob/master/LICENSE</PackageLicenseUrl>
1818
<PackageProjectUrl>https://github.com/stackify/stackify-api-dotnet</PackageProjectUrl>
1919
<RepositoryUrl>https://github.com/stackify/stackify-api-dotnet</RepositoryUrl>

0 commit comments

Comments
 (0)