Skip to content

Commit

Permalink
more debug response and new version
Browse files Browse the repository at this point in the history
  • Loading branch information
knopkem committed Sep 7, 2020
1 parent ced82f2 commit e187cbf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dicom-dimse-native",
"version": "1.0.7",
"version": "1.0.8",
"description": "native addon using DCMTK dicom toolkit",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/BaseAsyncWorker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void BaseAsyncWorker::SendInfo(const std::string& msg, const ExecutionProgress&
void BaseAsyncWorker::EnableVerboseLogging(bool enabled)
{
if (enabled) {
OFLog::configure(OFLogger::INFO_LOG_LEVEL);
OFLog::configure(OFLogger::DEBUG_LOG_LEVEL);
} else {
OFLog::configure(OFLogger::WARN_LOG_LEVEL);
}
Expand Down
19 changes: 19 additions & 0 deletions src/FindAsyncWorker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,25 @@ FindScuCallback::FindScuCallback(const ns::DicomObject &rqContainer, std::list<n

void FindScuCallback::callback(T_DIMSE_C_FindRQ *request, int &responseCount, T_DIMSE_C_FindRSP *rsp, DcmDataset *responseIdentifiers)
{
OFLogger rspLogger = OFLog::getLogger(DCMNET_LOGGER_NAME ".responses");

if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
{
OFString temp_str;
DCMNET_INFO("Received Find Response " << responseCount);
DCMNET_DEBUG(DIMSE_dumpMessage(temp_str, *rsp, DIMSE_INCOMING));
if (rspLogger.isEnabledFor(OFLogger::INFO_LOG_LEVEL)) {
DCMNET_DEBUG("Response Identifiers:" << OFendl << DcmObject::PrintHelper(*responseIdentifiers));
}
}
/* otherwise check whether special response logger is enabled */
else if (rspLogger.isEnabledFor(OFLogger::INFO_LOG_LEVEL))
{
OFLOG_INFO(rspLogger, "---------------------------");
OFLOG_INFO(rspLogger, "Find Response: " << responseCount << " (" << DU_cfindStatusString(rsp->DimseStatus) << ")");
OFLOG_INFO(rspLogger, DcmObject::PrintHelper(*responseIdentifiers));
}

ns::DicomObject responseItem;
for (const ns::DicomElement &element : m_requestContainer)
{
Expand Down

0 comments on commit e187cbf

Please sign in to comment.