Skip to content

Commit

Permalink
ENH: Set ctkErrorLogLevel to Info for ctkLogger when in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Punzo committed Jan 22, 2024
1 parent 3e85a4a commit 3739cde
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Libs/Core/ctkLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class ctkLoggerPrivate
~ctkLoggerPrivate() = default;

#ifndef QT_NO_DEBUG
ctkErrorLogLevel::LogLevel LogLevel{ctkErrorLogLevel::LogLevel::Debug};
ctkErrorLogLevel::LogLevel LogLevel{ctkErrorLogLevel::LogLevel::Info};
#else
ctkErrorLogLevel::LogLevel LogLevel{ctkErrorLogLevel::LogLevel::Warning};
#endif
Expand Down
2 changes: 1 addition & 1 deletion Libs/DICOM/Core/ctkDICOMEcho.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ bool ctkDICOMEcho::echo()
return false;
}

logger.debug("Seding Echo");
logger.info("Seding Echo");
// Issue ECHO request and let scu find presentation context itself (0)
OFCondition status = d->SCU.sendECHORequest(0);
if (!status.good())
Expand Down
8 changes: 4 additions & 4 deletions Libs/DICOM/Core/ctkDICOMIndexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void ctkDICOMIndexerPrivateWorker::start()
imagesCountAfter = database.imagesCount();

double elapsedTimeInSeconds = timeProbe.elapsed() / 1000.0;
logger.debug(QString("DICOM indexer has updated display fields for %1 files [%2s]")
logger.info(QString("DICOM indexer has updated display fields for %1 files [%2s]")
.arg(imagesCountAfter-imagesCountBefore).arg(QString::number(elapsedTimeInSeconds, 'f', 2)));

// restart if new requests has been queued during displayed fields update
Expand Down Expand Up @@ -250,7 +250,7 @@ void ctkDICOMIndexerPrivateWorker::processIndexingRequest(DICOMIndexingQueue::In
}

float elapsedTimeInSeconds = timeProbe.elapsed() / 1000.0;
logger.debug(QString("DICOM indexer has successfully processed %1 files [%2s]")
logger.info(QString("DICOM indexer has successfully processed %1 files [%2s]")
.arg(currentFileIndex).arg(QString::number(elapsedTimeInSeconds, 'f', 2)));
}

Expand Down Expand Up @@ -279,7 +279,7 @@ void ctkDICOMIndexerPrivateWorker::writeIndexingResultsToDatabase(ctkDICOMDataba
this->NumberOfInstancesInserted = 0;

float elapsedTimeInSeconds = timeProbe.elapsed() / 1000.0;
logger.debug(QString("DICOM indexer has successfully inserted %1 files [%2s]")
logger.info(QString("DICOM indexer has successfully inserted %1 files [%2s]")
.arg(indexingResults.count()).arg(QString::number(elapsedTimeInSeconds, 'f', 2)));

}
Expand Down Expand Up @@ -634,7 +634,7 @@ bool ctkDICOMIndexer::addDicomdir(const QString& directoryName, bool copyFile/*=
}
}
float elapsedTimeInSeconds = timeProbe.elapsed() / 1000.0;
logger.debug(QString("DICOM indexer has successfully processed DICOMDIR in %1 [%2s]")
logger.info(QString("DICOM indexer has successfully processed DICOMDIR in %1 [%2s]")
.arg(directoryName)
.arg(QString::number(elapsedTimeInSeconds,'f', 2)));
this->addListOfFiles(listOfInstances, copyFile);
Expand Down
4 changes: 2 additions & 2 deletions Libs/DICOM/Core/ctkDICOMQuery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ bool ctkDICOMQuery::query(ctkDICOMDatabase& database)
}
else
{
logger.debug("DB not open in Query");
logger.warn("DB not open in Query");
emit progress(tr("DB not open in Query"));
}
emit progress(0);
Expand Down Expand Up @@ -392,7 +392,7 @@ bool ctkDICOMQuery::query(ctkDICOMDatabase& database)
}
else
{
logger.info("Found useful presentation context");
logger.debug("Found useful presentation context");
emit progress(tr("Found useful presentation context"));
}
emit progress(40);
Expand Down
2 changes: 1 addition & 1 deletion Libs/DICOM/Widgets/ctkDICOMServerNodeWidget2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ int ctkDICOMServerNodeWidget2Private::addServerNode(const QMap<QString, QVariant

if (this->getServerNodeRowFromConnectionName(node["Name"].toString()) != -1)
{
logger.debug("addServerNode failed: the server has a duplicate. The connection name has to be unique \n");
logger.warn("addServerNode failed: the server has a duplicate. The connection name has to be unique \n");
return -1;
}

Expand Down

0 comments on commit 3739cde

Please sign in to comment.