]> Devoid-pointer.net GitWeb - anyanka.git/commitdiff
Use Logger instead of QDebug in Integrator
authorMichal Malý <madcatxster@devoid-pointer.net>
Wed, 4 Mar 2015 00:25:30 +0000 (01:25 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Wed, 4 Mar 2015 00:25:30 +0000 (01:25 +0100)
integrator.cpp

index 5633cc8b69f00a5b646853a67ad1d66027c168f7..7714faeffbe4d8a5ff5da26b513bbc1247687248 100644 (file)
@@ -204,11 +204,11 @@ Integrator::ReturnCode Integrator::integrateInternal(const size_t startIdx, cons
   if (down) peakType = IntegratedPeak::Type::VALLEY;
   else peakType = IntegratedPeak::Type::PEAK;
 
-  qDebug("Peak integrated");
+  Logger::log(Logger::Level::DEBUG, ME_SENDER_STR, __QFUNC__ + "Peak integrated");
   //qDebug() << "SXC" << fromX << "SYC" << fromY << "EXC" << toX << "EYC" << toY << "Slope" << slope;
-  qDebug() << "1st(X, Y, vY)" << startIdx << m_signal->valueAt(startIdx) << startY;
-  qDebug() << "2nd(X, Y, vY)" << stopIdx << m_signal->valueAt(stopIdx) << stopY;
-  qDebug("---");
+  Logger::log(Logger::Level::DEBUG, ME_SENDER_STR, __QFUNC__ + QString("1st(X: %1, Y: %2, vY: %3)").arg(startIdx).arg(m_signal->valueAt(startIdx)).arg(startY));
+  Logger::log(Logger::Level::DEBUG, ME_SENDER_STR, __QFUNC__ + QString("2nd(X: %1, Y: %2, vY: %3)").arg(stopIdx).arg(m_signal->valueAt(stopIdx)).arg(stopY));
+  Logger::log(Logger::Level::DEBUG, ME_SENDER_STR, __QFUNC__ + "---");
 
   peak = std::shared_ptr<IntegratedPeak>(new IntegratedPeak(peakType, auc, peakValueIdx, m_signal->timeAt(peakValueIdx), m_signal->valueAt(peakValueIdx),
                                                             startIdx, stopIdx, m_signal->timeAt(startIdx), m_signal->timeAt(stopIdx),
@@ -216,7 +216,7 @@ Integrator::ReturnCode Integrator::integrateInternal(const size_t startIdx, cons
   emit addingPeak(m_peakCount);
   addPeakToMap(peak);
   emit peakAdded();
-  qDebug() << "Peak added, count" << m_peakCount;
+  Logger::log(Logger::Level::DEBUG, ME_SENDER_STR, __QFUNC__ + QString("Peak added, count: %1").arg(m_peakCount));
   return ReturnCode::SUCCESS;
 }