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


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/bncnetqueryv2.cpp

    r11126 r11185  
    4343  if (_secure ) {
    4444    if (!QSslSocket::supportsSsl()) {
    45       BNC_CORE->slotMessage("No SSL support, install OpenSSL run-time libraries", true);
     45      BNC_CORE->message("No SSL support, install OpenSSL run-time libraries", true, "ntrip", t_logRecord::error);
    4646      stop();
    4747    }
    … …  
    8080    _status = error;
    8181    if (!_reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray().isEmpty()) {
    82     emit newMessage(_url.path().toLatin1().replace(0,1,"")  +
     82    emit newLogRecord(t_logRecord::message(t_logRecord::warning, _url.path().toLatin1().replace(0,1,"")  +
    8383                    ": NetQueryV2: server replied: " +
    84                     _reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray(),
    85                     true);
     84                    _reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toByteArray()), true);
    8685    } else {
    87       emit newMessage(_url.path().toLatin1().replace(0,1,"")  +
     86      emit newLogRecord(t_logRecord::message(t_logRecord::warning, _url.path().toLatin1().replace(0,1,"")  +
    8887                         ": NetQueryV2: server replied: " +
    89                          _reply->errorString().toLatin1(),
    90                          true);
     88                         _reply->errorString().toLatin1()), true);
    9189    }
    9290  }
    … …  
    10098void bncNetQueryV2::slotProxyAuthenticationRequired(const QNetworkProxy&,
    10199                                                    QAuthenticator*) {
    102   emit newMessage("slotProxyAuthenticationRequired", true);
     100  emit newLogRecord(t_logRecord::message(t_logRecord::warning, "slotProxyAuthenticationRequired"), true);
    103101}
    104102
    … …  
    240238  if (timedOut) {
    241239    _status = error;
    242     emit newMessage(_url.path().toLatin1().replace(0,1,"")
    243                     + ": Read timeout", true);
     240    emit newLogRecord(t_logRecord::message(t_logRecord::warning, _url.path().toLatin1().replace(0,1,"")
     241                    + ": Read timeout"), true);
    244242    disconnect(_reply, SIGNAL(finished()), this, SLOT(slotFinished()));
    245243    _reply->abort();
    … …  
    294292  if (_sslIgnoreErrors) {
    295293    _reply->ignoreSslErrors();
    296     BNC_CORE->slotMessage((msg + " (ignored as configured)").toLatin1(), true);
     294    BNC_CORE->message((msg + " (ignored as configured)").toLatin1(), true, "ntrip", t_logRecord::warning);
    297295  }
    298296  else {
    299     BNC_CORE->slotMessage(msg.toLatin1(), true);
     297    BNC_CORE->message(msg.toLatin1(), true, "ntrip", t_logRecord::error);
    300298    stop();
    301299  }
Note: See TracChangeset for help on using the changeset viewer.