Changeset 11185 in ntrip for trunk/BNC/src/bnccredentials.cpp
- Timestamp:
- Nov 9, 2026, 12:15:48 PM (12 hours ago)
- File:
-
- 1 edited
-
trunk/BNC/src/bnccredentials.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccredentials.cpp
r11160 r11185 51 51 52 52 // Log a message once per key 53 void message(const QString& key, const QString& msg) { 53 void message(const QString& key, const QString& msg, t_logRecord::e_level level) { 54 54 if (!_reported.contains(key)) { 55 55 _reported.insert(key); 56 BNC_CORE-> slotMessage(msg.toLatin1(), true);56 BNC_CORE->message(msg.toLatin1(), true, "ntrip", level); 57 57 } 58 58 } … … 180 180 message(fileName + QString(":%1").arg(lineNumbers[iLine]), 181 181 QString("Credentials file %1, line %2: not <host> [<port>] <user> <password>, ignored") 182 .arg(fileName).arg(lineNumbers[iLine])); 182 .arg(fileName).arg(lineNumbers[iLine]), t_logRecord::warning); 183 183 } 184 184 } … … 205 205 file.refused = true; 206 206 message("perm:" + fileName, 207 QString("Credentials file %1 is readable for other users, not used (chmod 600)").arg(fileName)); 207 QString("Credentials file %1 is readable for other users, not used (chmod 600)").arg(fileName), 208 t_logRecord::warning); 208 209 return file; 209 210 } … … 212 213 QFile inp(fileName); 213 214 if (!inp.open(QIODevice::ReadOnly | QIODevice::Text)) { 214 message("open:" + fileName, QString("Cannot read credentials file %1").arg(fileName)); 215 message("open:" + fileName, QString("Cannot read credentials file %1").arg(fileName), 216 t_logRecord::error); 215 217 return file; 216 218 } … … 332 334 message("config:" + account, 333 335 QString("%1: password in the configuration file, it can be moved to a credentials file " 334 "(option 'credentialsFile', default ~/.netrc)").arg(account)); 336 "(option 'credentialsFile', default ~/.netrc)").arg(account), 337 t_logRecord::info); 335 338 } 336 339 return; … … 342 345 QMutexLocker locker(&_mutex); 343 346 message("none:" + account, QString("%1: no password in the configuration file nor in %2") 344 .arg(account).arg(fileNames().join(", "))); 345 } 346 } 347 .arg(account).arg(fileNames().join(", ")), t_logRecord::warning); 348 } 349 }
Note:
See TracChangeset
for help on using the changeset viewer.
