Update logger scope state in Flowchart activity
The logger scope state within the Flowchart activity has been updated to use the current managed thread ID from the Environment class. Additionally, a new property 'TaskId' has been incorporated for providing the current task ID, defaulting to 'N/A' in case null.
This commit is contained in:
parent
dc2184fba4
commit
07c889f489
|
|
@ -141,7 +141,8 @@ public class Flowchart : Container
|
|||
var logger = context.GetRequiredService<ILogger<Flowchart>>();
|
||||
var loggerScopeState = new Dictionary<string, object>
|
||||
{
|
||||
["ThreadId"] = Thread.CurrentThread.ManagedThreadId,
|
||||
["ThreadId"] = Environment.CurrentManagedThreadId,
|
||||
["TaskId"] = Task.CurrentId?.ToString() ?? "N/A",
|
||||
["ActivityId"] = Id,
|
||||
["ActivityInstanceId"] = context.TargetContext.Id
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue