Skip to content

Commit 52862cf

Browse files
committed
added more scoped logging
Signed-off-by: Neil South <[email protected]>
1 parent eba8bc7 commit 52862cf

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/InformaticsGateway/Services/Export/ExportServiceBase.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ private IEnumerable<ExportRequestDataMessage> DownloadPayloadActionCallback(Expo
275275

276276
private async Task<ExportRequestDataMessage> ExecuteOutputDataEngineCallback(ExportRequestDataMessage exportDataRequest)
277277
{
278+
using var loggerScope = _logger.BeginScope(new Messaging.Common.LoggingDataDictionary<string, object> {
279+
{ "WorkflowInstanceId", exportDataRequest.WorkflowInstanceId },
280+
{ "TaskId", exportDataRequest.ExportTaskId }
281+
});
278282
var outputDataEngine = _scope.ServiceProvider.GetService<IOutputDataPlugInEngine>() ?? throw new ServiceNotFoundException(nameof(IOutputDataPlugInEngine));
279283

280284
outputDataEngine.Configure(exportDataRequest.PlugInAssemblies);

src/InformaticsGateway/Services/Scp/ApplicationEntityManager.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
using System;
1919
using System.Collections.Concurrent;
20+
using System.Threading;
2021
using System.Threading.Tasks;
21-
using Amazon.Runtime.Internal.Transform;
2222
using Ardalis.GuardClauses;
2323
using FellowOakDicom.Network;
2424
using Microsoft.Extensions.DependencyInjection;
@@ -119,7 +119,8 @@ private async Task<string> HandleInstance(DicomCStoreRequest request, string cal
119119
{ "SOPInstanceUID", uids.SopInstanceUid },
120120
{ "CorrelationId", associationId },
121121
{ "calledAeTitle", calledAeTitle},
122-
{ "callingAeTitle",callingAeTitle}
122+
{ "callingAeTitle",callingAeTitle},
123+
{ "ThreadId", Environment.CurrentManagedThreadId}
123124
}))
124125
{
125126
_logger.InstanceInformation(uids.StudyInstanceUid, uids.SeriesInstanceUid);

0 commit comments

Comments
 (0)