Skip to content

Commit 9743487

Browse files
committed
Fix Log4Net Appender Logical Thread Context
Was putting the wrong value into the properties for Logical Thread Context when getting a "LogicalThreadContextStack".
1 parent 9df95dc commit 9743487

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Src/StackifyLib.log4net/StackifyAppender.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,6 @@ internal LogMsg Translate(LoggingEvent loggingEvent)
237237
msg.Msg += "\r\n" + error.ToString();
238238
}
239239
}
240-
241-
242240

243241
if (!string.IsNullOrWhiteSpace(errorAdditionalMessage) && error != null)
244242
{
@@ -349,7 +347,7 @@ private Dictionary<string, object> GetDiagnosticContextProperties()
349347
var mdcType = mdcValue.GetType();
350348
if (mdcType.FullName == "log4net.Util.LogicalThreadContextStack")
351349
{
352-
properties[mdcKey.ToLower()] = mdcType.ToString();
350+
properties[mdcKey.ToLower()] = mdcValue.ToString();
353351
continue;
354352
}
355353

0 commit comments

Comments
 (0)