Changeset 11185 in ntrip for trunk/BNC/src/pppRun.cpp


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

Structured logging improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/pppRun.cpp

    r11179 r11185  
    6868  _opt = opt;
    6969
    70   connect(this, SIGNAL(newMessage(QByteArray,bool)),
    71           BNC_CORE, SLOT(slotMessage(const QByteArray,bool)));
    72   connect(this, SIGNAL(newLogRecord(t_logRecord,bool)),
    73           BNC_CORE, SLOT(slotLogRecord(t_logRecord,bool)));
    74   t_logRecord::registerStation(QByteArray(_opt->_roverName.c_str()));
     70  BNC_CORE->connectMessages(this, "ppp");
     71  BNC_CORE->connectLogRecords(this, "ppp");
     72  t_logRecord::registerStream(QByteArray(_opt->_roverName.c_str()));
    7573
    7674  connect(this,     SIGNAL(newPosition(QByteArray, bncTime, QVector<double>)),
    … …  
    8886                                                                Qt::SkipEmptyParts);
    8987    if (!_ephMounts.isEmpty()) {
    90       emit newMessage(QByteArray(_opt->_roverName.c_str()) + ": PPP uses the ephemerides of "
    91                       + _ephMounts.join(", ").toLatin1() + " only", true);
     88      emit newLogRecord(t_logRecord::message(t_logRecord::info, QByteArray(_opt->_roverName.c_str()) + ": PPP uses the ephemerides of "
     89                      + _ephMounts.join(", ").toLatin1() + " only"), true);
    9290    }
    9391
    … …  
    748746        }
    749747        catch (const char* msg) {
    750           emit newMessage(QByteArray(msg), true);
     748          emit newLogRecord(t_logRecord::message(t_logRecord::error, QByteArray(msg)), true);
    751749          break;
    752750        }
    753751        catch (const string& msg) {
    754           emit newMessage(QByteArray(msg.c_str()), true);
     752          emit newLogRecord(t_logRecord::message(t_logRecord::error, QByteArray(msg.c_str())), true);
    755753          break;
    756754        }
    757755        catch (...) {
    758           emit newMessage("unknown exceptions in file " + file->name().toLatin1(), true);
     756          emit newLogRecord(t_logRecord::message(t_logRecord::error, "unknown exceptions in file " + file->name().toLatin1()), true);
    759757          break;
    760758        }
    … …  
    888886
    889887  QString msg = "pppRun " + QString(_opt->_roverName.c_str()) + ": SSR Provider or Service changed: " + mountPoint;
    890   emit newMessage(msg.toLatin1(), true);
     888  emit newLogRecord(t_logRecord::message(t_logRecord::info, msg.toLatin1()), true);
    891889
    892890  _pppClient->reset();
Note: See TracChangeset for help on using the changeset viewer.