Ignore:
Timestamp:
Nov 9, 2026, 12:15:48 PM (12 hours ago)
Author:
stuerze
Message:

Structured logging improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp

    r11115 r11185  
    9696          BNC_CORE, SIGNAL(providerIDChanged(QString)), conType);
    9797
    98   connect(this, SIGNAL(newMessage(QByteArray,bool)),
    99           BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
     98  BNC_CORE->connectMessages(this, "ssr");
     99  BNC_CORE->connectLogRecords(this, "ssr");
    100100
    101101  reset();
    … …  
    300300        }
    301301        else {
    302           emit newMessage("RTCM3coDecoder: _lastTime invalid: " + _staID.toLatin1(), true);
     302          emit newLogRecord(t_logRecord::message(t_logRecord::warning, "RTCM3coDecoder: _lastTime invalid: " + _staID.toLatin1()), true);
    303303          retCode = failure;
    304304        }
    … …  
    962962
    963963  if (alreadySet && different) {
    964     emit newMessage("RTCM3coDecoder: SSR Provider or Service changed " +  newProviderIDStr.toLatin1() + _staID.toLatin1(), true);
     964    emit newLogRecord(t_logRecord::message(t_logRecord::info, "RTCM3coDecoder: SSR Provider or Service changed " +  newProviderIDStr.toLatin1() + _staID.toLatin1()), true);
    965965    emit providerIDChanged(_staID);
    966966  }
    … …  
    11041104
    11051105  if (corrIsOutOfRange) {
    1106     emit newMessage("RTCM3coDecoder: Correction " + ssrParStr.toLatin1()
     1106    emit newLogRecord(t_logRecord::message(t_logRecord::warning, "RTCM3coDecoder: Correction " + ssrParStr.toLatin1()
    11071107        + " (" + ssrParValue.toLatin1() + ") "
    1108         + "is out of range "  + _staID.toLatin1(), true);
     1108        + "is out of range "  + _staID.toLatin1()), true);
    11091109  }
    11101110
    … …  
    12411241        warned = currentTime;
    12421242        if (secOfWeek) {
    1243           emit newMessage(_staID.toLatin1() + ": IGS-SSR GLONASS epoch time erroneously encoded "
     1243          emit newLogRecord(t_logRecord::message(t_logRecord::warning, _staID.toLatin1() + ": IGS-SSR GLONASS epoch time erroneously encoded "
    12441244                          "(UTC seconds of week instead of GPS seconds of week, IGS SSR v1.00 IDF003) "
    1245                           "detected and converted - the SSR encoder should be corrected", true);
     1245                          "detected and converted - the SSR encoder should be corrected"), true);
    12461246        }
    12471247        else {
    1248           emit newMessage(_staID.toLatin1() + ": IGS-SSR GLONASS epoch time in outdated convention "
     1248          emit newLogRecord(t_logRecord::message(t_logRecord::warning, _staID.toLatin1() + ": IGS-SSR GLONASS epoch time in outdated convention "
    12491249                          "(UTC seconds of day instead of GPS seconds of week, IGS SSR v1.00 IDF003) "
    1250                           "detected and converted - the SSR encoder should be updated", true);
     1250                          "detected and converted - the SSR encoder should be updated"), true);
    12511251        }
    12521252      }
    … …  
    12811281      if (!warned.valid() || currentTime - warned >= 3600.0) {
    12821282        warned = currentTime;
    1283         emit newMessage(_staID.toLatin1() + ": IGS-SSR BDS epoch time in outdated convention "
     1283        emit newLogRecord(t_logRecord::message(t_logRecord::warning, _staID.toLatin1() + ": IGS-SSR BDS epoch time in outdated convention "
    12841284                        "(BDT instead of GPS seconds of week, IGS SSR v1.00 IDF003) "
    1285                         "detected and converted - the SSR encoder should be updated", true);
     1285                        "detected and converted - the SSR encoder should be updated"), true);
    12861286      }
    12871287    }
    … …  
    13441344    if (!warned.valid() || currentTime - warned >= 3600.0) {
    13451345      warned = currentTime;
    1346       emit newMessage(QString("%1: %2 SSR epoch time %3 %4 differs by %5 s from the GPS SSR epoch time "
     1346      emit newLogRecord(t_logRecord::message(t_logRecord::warning, QString("%1: %2 SSR epoch time %3 %4 differs by %5 s from the GPS SSR epoch time "
    13471347                              "of the stream - erroneously encoded?")
    13481348                      .arg(_staID).arg(epoSys)
    13491349                      .arg(QString::fromStdString(_lastTime.datestr()))
    13501350                      .arg(QString::fromStdString(_lastTime.timestr(0)))
    1351                       .arg(_lastTime - _lastGpsEpoch, 0, 'f', 0).toLatin1(), true);
     1351                      .arg(_lastTime - _lastGpsEpoch, 0, 'f', 0).toLatin1()), true);
    13521352    }
    13531353  }
    … …  
    13801380  if (!_prnOutOfRangeLogged.contains(prnStr)) {
    13811381    _prnOutOfRangeLogged.insert(prnStr);
    1382     emit newMessage(QString("%1: satellite %2 outside the range supported by BNC - not usable for processing")
    1383                     .arg(_staID).arg(prnStr).toLatin1(), true);
     1382    emit newLogRecord(t_logRecord::message(t_logRecord::warning, QString("%1: satellite %2 outside the range supported by BNC - not usable for processing")
     1383                    .arg(_staID).arg(prnStr).toLatin1()), true);
    13841384  }
    13851385}
    … …  
    14211421    if (!_antennaIODLogged.contains(key)) {
    14221422      _antennaIODLogged.insert(key);
    1423       emit newMessage(QString("%1: GNSS %2 Satellite Antenna IOD switches back %3 -> %4"
     1423      emit newLogRecord(t_logRecord::message(t_logRecord::warning, QString("%1: GNSS %2 Satellite Antenna IOD switches back %3 -> %4"
    14241424                              " - messages of one GNSS must use the same IOD")
    1425                       .arg(_staID).arg(sys).arg(_antennaIODCur[s]).arg(iod).toLatin1(), true);
     1425                      .arg(_staID).arg(sys).arg(_antennaIODCur[s]).arg(iod).toLatin1()), true);
    14261426    }
    14271427  }
Note: See TracChangeset for help on using the changeset viewer.