changeset 4282:65086904ec45

debug logs for storage commitment SCU
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 04 Nov 2020 14:21:13 +0100
parents d2f79a475b51
children 6b58ceed959e
files OrthancFramework/Sources/DicomNetworking/DicomAssociation.cpp
diffstat 1 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomNetworking/DicomAssociation.cpp	Wed Nov 04 13:48:42 2020 +0100
+++ b/OrthancFramework/Sources/DicomNetworking/DicomAssociation.cpp	Wed Nov 04 14:21:13 2020 +0100
@@ -673,6 +673,13 @@
                                parameters.GetRemoteModality().GetApplicationEntityTitle());
       }
 
+      {
+        OFString str;
+        CLOG(TRACE, DICOM) << "Sending Storage Commitment Report:" << std::endl
+                           << DIMSE_dumpMessage(str, message, DIMSE_OUTGOING) << std::endl
+                           << DcmObject::PrintHelper(dataset);
+      }
+
       if (!DIMSE_sendMessageUsingMemoryData(
             &association.GetDcmtkAssociation(), presID, &message, NULL /* status detail */,
             &dataset, NULL /* callback */, NULL /* callback context */,
@@ -701,6 +708,12 @@
                                parameters.GetRemoteModality().GetApplicationEntityTitle());
       }
 
+      {
+        OFString str;
+        CLOG(TRACE, DICOM) << "Received Storage Commitment Report Response:" << std::endl
+                           << DIMSE_dumpMessage(str, message, DIMSE_INCOMING, NULL, presID);
+      }
+      
       const T_DIMSE_N_EventReportRSP& content = message.msg.NEventReportRSP;
       if (content.MessageIDBeingRespondedTo != messageId ||
           !(content.opts & O_NEVENTREPORT_AFFECTEDSOPCLASSUID) ||
@@ -820,6 +833,13 @@
                                parameters.GetRemoteModality().GetApplicationEntityTitle());
       }
 
+      {
+        OFString str;
+        CLOG(TRACE, DICOM) << "Sending Storage Commitment Request:" << std::endl
+                           << DIMSE_dumpMessage(str, message, DIMSE_OUTGOING) << std::endl
+                           << DcmObject::PrintHelper(dataset);
+      }
+
       if (!DIMSE_sendMessageUsingMemoryData(
             &association.GetDcmtkAssociation(), presID, &message, NULL /* status detail */,
             &dataset, NULL /* callback */, NULL /* callback context */,
@@ -862,6 +882,12 @@
                                parameters.GetRemoteModality().GetApplicationEntityTitle());
       }
 
+      {
+        OFString str;
+        CLOG(TRACE, DICOM) << "Received Storage Commitment Request Response:" << std::endl
+                           << DIMSE_dumpMessage(str, message, DIMSE_INCOMING, NULL, presID);
+      }
+
       if (content.DimseStatus != 0 /* success */)
       {
         throw OrthancException(ErrorCode_NetworkProtocol, "Storage commitment - "