Index: trunk/BNC/src/combination/bnccomb.cpp
===================================================================
--- trunk/BNC/src/combination/bnccomb.cpp	(revision 11158)
+++ trunk/BNC/src/combination/bnccomb.cpp	(revision 11185)
@@ -209,12 +209,13 @@
   _rtnetDecoder = new bncRtnetDecoder();
 
-  connect(this, SIGNAL(newMessage(QByteArray,bool)), BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
+  BNC_CORE->connectMessages(this, "cmb");
+  BNC_CORE->connectLogRecords(this, "cmb");
 
   // Reference signals of the clocks
   for (const QString& err : t_ssrRefSig::init()) {
-    emit newMessage(("bncComb: " + err).toLatin1(), true);
+    emit newLogRecord(t_logRecord::message(t_logRecord::warning, ("bncComb: " + err).toLatin1()), true);
   }
   if (!t_ssrRefSig::allDefault()) {
-    emit newMessage(("bncComb: reference signals of the clocks " + t_ssrRefSig::currentString()).toLatin1(), true);
+    emit newLogRecord(t_logRecord::message(t_logRecord::info, ("bncComb: reference signals of the clocks " + t_ssrRefSig::currentString()).toLatin1()), true);
   }
 
@@ -278,10 +279,10 @@
     _antex = new bncAntex();
     if (_antex->readFile(antexFileName) != success) {
-      emit newMessage("bncComb: wrong ANTEX file", true);
+      emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncComb: wrong ANTEX file"), true);
       delete _antex;
       _antex = 0;
     }
     else {
-      emit newMessage("bncComb: " + _antex->info().toLatin1(), true);
+      emit newLogRecord(t_logRecord::message(t_logRecord::info, "bncComb: " + _antex->info().toLatin1()), true);
     }
   }
@@ -302,14 +303,14 @@
       it.value() = false;
     }
-    emit newMessage("bncComb: APC and CoM streams configured - combination in the CoM frame, "
-                    "orbits of the APC streams converted to CoM", true);
+    emit newLogRecord(t_logRecord::message(t_logRecord::info, "bncComb: APC and CoM streams configured - combination in the CoM frame, "
+                    "orbits of the APC streams converted to CoM"), true);
   }
   else if (hasAPC && hasCoM) {
-    emit newMessage("bncComb: APC and CoM streams configured, but no ANTEX file - only the streams "
-                    "with the reference point of the master AC are combined", true);
+    emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncComb: APC and CoM streams configured, but no ANTEX file - only the streams "
+                    "with the reference point of the master AC are combined"), true);
   }
   if (!_antex && hasCoM) {
-    emit newMessage("bncComb: CoM streams configured, but no ANTEX file - the combined orbits (INTERNAL) "
-                    "may refer to the CoM, while the PPP assumes the APC", true);
+    emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncComb: CoM streams configured, but no ANTEX file - the combined orbits (INTERNAL) "
+                    "may refer to the CoM, while the PPP assumes the APC"), true);
   }
 
@@ -322,5 +323,5 @@
     _bsx = new bncBiasSnx();
     if (_bsx->readFile(bsxFileName) != success) {
-      emit newMessage("bncComb: wrong Bias SINEX file", true);
+      emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncComb: wrong Bias SINEX file"), true);
       delete _bsx;
       _bsx = 0;
@@ -418,5 +419,5 @@
 
   if (bsxFileName.isEmpty()) {
-    emit newMessage("bncComb: no Bias SINEX file specified", true);
+    emit newLogRecord(t_logRecord::message(t_logRecord::info, "bncComb: no Bias SINEX file specified"), true);
     return;
   }
@@ -425,10 +426,10 @@
   }
   if (_bsx->readFile(bsxFileName) != success) {
-    emit newMessage("bncComb: wrong Bias SINEX file", true);
+    emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncComb: wrong Bias SINEX file"), true);
     delete _bsx;
     _bsx = 0;
   }
   else {
-    emit newMessage("bncComb: successfully read Bias SINEX file", true);
+    emit newLogRecord(t_logRecord::message(t_logRecord::info, "bncComb: successfully read Bias SINEX file"), true);
   }
 
@@ -638,8 +639,8 @@
       if (!warned.valid() || newClk._time - warned >= 3600.0) {
         warned = newClk._time;
-        emit newMessage("bncComb: " + acName.toLatin1() + " " + QByteArray(1, sys) + " not combined: its orbits refer to the " +
+        emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncComb: " + acName.toLatin1() + " " + QByteArray(1, sys) + " not combined: its orbits refer to the " +
                         (isAPC ? "APC" : "CoM") + ", those of the master AC " + _masterOrbitAC[sys].toLatin1() +
                         " to the " + (isAPC ? "CoM" : "APC") +
-                        " (an ANTEX file allows to combine both in the CoM frame)", true);
+                        " (an ANTEX file allows to combine both in the CoM frame)"), true);
       }
       continue;
@@ -651,7 +652,7 @@
       if (fabs(currentTime - newClk._time) > 60.0) { // future or very old data sets
   #ifdef BNC_DEBUG_CMB
-        emit newMessage("bncComb: future or very old data sets: " + acName.toLatin1() + " " + newClk._prn.toString().c_str() +
+        emit newLogRecord(t_logRecord::debugMessage("cmb", "bncComb: future or very old data sets: " + acName.toLatin1() + " " + newClk._prn.toString().c_str() +
             QString(" %1 ").arg(newClk._time.timestr().c_str()).toLatin1() + "vs. current time" +
-            QString(" %1 ").arg(currentTime.timestr().c_str()).toLatin1(), true);
+            QString(" %1 ").arg(currentTime.timestr().c_str()).toLatin1()), true);
   #endif
         continue;
@@ -663,7 +664,7 @@
     if (_resTime.valid() && newClk._time <= _resTime) {
 #ifdef BNC_DEBUG_CMB
-      emit newMessage("bncComb: old correction: " + acName.toLatin1() + " " + newClk._prn.toString().c_str() +
+      emit newLogRecord(t_logRecord::debugMessage("cmb", "bncComb: old correction: " + acName.toLatin1() + " " + newClk._prn.toString().c_str() +
           QString(" %1 ").arg(newClk._time.timestr().c_str()).toLatin1() + "vs. last processing Epoch" +
-          QString(" %1 ").arg(_resTime.timestr().c_str()).toLatin1(), true);
+          QString(" %1 ").arg(_resTime.timestr().c_str()).toLatin1()), true);
 #endif
       continue;
@@ -780,5 +781,5 @@
     + QString(" %1 -> %2 %3").arg(corr->_iod,3).arg(lastEph->IOD(),3).arg(dC*t_CST::c, 8, 'f', 4);
 
-  emit newMessage(msg.toLatin1(), false);
+  emit newLogRecord(t_logRecord::message(t_logRecord::info, msg.toLatin1()), false);
 
   corr->_iod = lastEph->IOD();
@@ -800,5 +801,5 @@
     QString msg = _antexReloader.update(_antex, epoTime);
     if (!msg.isEmpty()) {
-      emit newMessage(("bncComb: " + msg).toLatin1(), true);
+      emit newLogRecord(t_logRecord::message(t_logRecord::info, ("bncComb: " + msg).toLatin1()), true);
     }
   }
@@ -860,5 +861,5 @@
     if (ephLast == 0) {
 #ifdef BNC_DEBUG_CMB
-      emit newMessage("bncComb: eph not found for "  + prnStr.mid(0,3).toLatin1(), true);
+      emit newLogRecord(t_logRecord::debugMessage("cmb", "bncComb: eph not found for "  + prnStr.mid(0,3).toLatin1()), true);
 #endif
       delete _newCorr; _newCorr = 0;
@@ -870,5 +871,5 @@
              ephLast->checkState() == t_eph::unhealthy) {
 #ifdef BNC_DEBUG_CMB
-      emit newMessage("bncComb: ephLast not ok (checkState: " +  ephLast->checkStateToString().toLatin1() + ") for "  + prnStr.mid(0,3).toLatin1(), true);
+      emit newLogRecord(t_logRecord::debugMessage("cmb", "bncComb: ephLast not ok (checkState: " +  ephLast->checkStateToString().toLatin1() + ") for "  + prnStr.mid(0,3).toLatin1()), true);
 #endif
       delete _newCorr; _newCorr = 0;
@@ -888,6 +889,6 @@
       else {
 #ifdef BNC_DEBUG_CMB
-        emit newMessage("bncComb: eph not found for "  + prnStr.mid(0,3).toLatin1() +
-                        QString(" with IOD %1").arg(_newCorr->_iod).toLatin1(), true);
+        emit newLogRecord(t_logRecord::debugMessage("cmb", "bncComb: eph not found for "  + prnStr.mid(0,3).toLatin1() +
+                        QString(" with IOD %1").arg(_newCorr->_iod).toLatin1()), true);
 #endif
         delete _newCorr; _newCorr = 0;
@@ -955,9 +956,9 @@
           }
         }
-        emit newMessage("bncComb: " + acName.toLatin1() + " provides no code biases for the " +
+        emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncComb: " + acName.toLatin1() + " provides no code biases for the " +
                         QByteArray(1, sys) + " reference signal(s)" + missing.toLatin1() +
                         " (e.g. " + prnStr.mid(0,3).toLatin1() + ") - these clocks are combined"
                         " without referring them to the reference signals and, as long as other ACs"
-                        " provide referred clocks, excluded from the clock datum", false);
+                        " provide referred clocks, excluded from the clock datum"), false);
       }
     }
@@ -1112,5 +1113,5 @@
       out << "Missing Master, Epoch skipped" << "\n";
       _buffer.remove(sys);
-      emit newMessage(_log, false);
+      emit newLogRecord(t_logRecord::message(t_logRecord::info, _log), false);
       return;
     }
@@ -1411,5 +1412,5 @@
         out << epoTime.datestr().c_str() << " " << epoTime.timestr().c_str()
             << " " << msg << "\n";
-        emit newMessage("bncComb: " + msg.toLatin1(), true);
+        emit newLogRecord(t_logRecord::message(t_logRecord::info, "bncComb: " + msg.toLatin1()), true);
         resetSatOffsets(sys);
       }
@@ -1440,5 +1441,5 @@
     if (!warned.valid() || epoTime - warned >= 3600.0) {
       warned = epoTime;
-      emit newMessage("bncComb: " + msg.toLatin1(), true);
+      emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncComb: " + msg.toLatin1()), true);
     }
   }
@@ -1471,8 +1472,8 @@
                                &corr->_attYaw) != success) {
     if (_antex->warnNoSatEntry(corr->_prn, corr->_time)) {
-      emit newMessage("bncComb: no satellite antenna entry valid at " +
+      emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncComb: no satellite antenna entry valid at " +
                       QByteArray(corr->_time.datestr().c_str()) + " " + QByteArray(corr->_time.timestr().c_str()) +
                       " for " + corr->_prn.mid(0,3).toLatin1() +
-                      " in ANTEX file - APC orbit of " + AC->name.toLatin1() + " not converted to CoM, not combined", true);
+                      " in ANTEX file - APC orbit of " + AC->name.toLatin1() + " not converted to CoM, not combined"), true);
     }
     return failure;
@@ -1549,5 +1550,5 @@
                   .arg(stat.numEpo).arg(median, 0, 'f', 2);
     out << epoTime.datestr().c_str() << " " << epoTime.timestr().c_str() << " " << msg << "\n";
-    emit newMessage("bncComb: " + msg.toLatin1(), true);
+    emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncComb: " + msg.toLatin1()), true);
   }
   _outlierStat[sys].clear();
@@ -1634,7 +1635,7 @@
       double age = epoTime - corr->_eph->TOC();
       if (fabs(age) > 960.0) {
-        emit newMessage(QString().asprintf(
+        emit newLogRecord(t_logRecord::message(t_logRecord::warning, QString().asprintf(
           "bncComb: skip %s, GLONASS eph age %.0fs",
-          corr->_prn.mid(0,3).toLatin1().data(), age).toLatin1(), false);
+          corr->_prn.mid(0,3).toLatin1().data(), age).toLatin1()), false);
         delete corr;
         it.remove();
@@ -1700,8 +1701,8 @@
         // converted between antenna phase center and center of mass
         if (_antex->warnNoSatEntry(corr->_prn, epoTime)) {
-          emit newMessage("bncComb: no satellite antenna entry valid at " +
+          emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncComb: no satellite antenna entry valid at " +
                           QByteArray(epoTime.datestr().c_str()) + " " + QByteArray(epoTime.timestr().c_str()) +
                           " for " + corr->_prn.mid(0,3).toLatin1() +
-                          " in ANTEX file - ANTEX file outdated? Satellite not combined", true);
+                          " in ANTEX file - ANTEX file outdated? Satellite not combined"), true);
         }
         orbCorrections.pop_back();
@@ -1717,5 +1718,5 @@
       for (const QString& line : yawLogs) {
         if (!line.contains(":att:")) {
-          emit newMessage(("bncComb: " + line.trimmed()).toLatin1(), false);
+          emit newLogRecord(t_logRecord::message(t_logRecord::info, ("bncComb: " + line.trimmed()).toLatin1()), false);
         }
       }
@@ -2318,5 +2319,5 @@
     if (!warned.valid() || epoTime - warned >= 3600.0) {
       warned = epoTime;
-      emit newMessage("bncComb: " + QByteArray(1, sys) + " " + msg.toLatin1(), false);
+      emit newLogRecord(t_logRecord::message(t_logRecord::warning, "bncComb: " + QByteArray(1, sys) + " " + msg.toLatin1()), false);
     }
   }
