changeset 4283:6b58ceed959e

starting debug logs for SCP
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 04 Nov 2020 14:48:52 +0100
parents 65086904ec45
children 756126cd2219
files OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp	Wed Nov 04 14:21:13 2020 +0100
+++ b/OrthancFramework/Sources/DicomNetworking/Internals/CommandDispatcher.cpp	Wed Nov 04 14:48:52 2020 +0100
@@ -284,6 +284,12 @@
         return NULL;
       }
 
+      {
+        OFString str;
+        CLOG(TRACE, DICOM) << "Received Association Parameters:" << std::endl
+                           << ASC_dumpParameters(str, assoc->params, ASC_ASSOC_RQ);
+      }
+
       // Retrieve the AET and the IP address of the remote modality
       std::string remoteAet;
       std::string remoteIp;
@@ -677,6 +683,12 @@
         LOG(INFO) << "Association Acknowledged (Max Send PDV: " << assoc->sendPDVLength << ")";
         if (ASC_countAcceptedPresentationContexts(assoc->params) == 0)
           LOG(INFO) << "    (but no valid presentation contexts)";
+
+        {
+          OFString str;
+          CLOG(TRACE, DICOM) << "Association Acknowledged Details:" << std::endl
+                             << ASC_dumpParameters(str, assoc->params, ASC_ASSOC_AC);
+        }
       }
 
       IApplicationEntityFilter* filter = server.HasApplicationEntityFilter() ? &server.GetApplicationEntityFilter() : NULL;
@@ -756,6 +768,12 @@
       }
       else if (cond == EC_Normal)
       {
+        {
+          OFString str;
+          CLOG(TRACE, DICOM) << "Received Command:" << std::endl
+                             << DIMSE_dumpMessage(str, msg, DIMSE_INCOMING, NULL, presID);
+        }
+        
         // Reset the association timeout counter
         elapsedTimeSinceLastCommand_ = 0;