Changeset 11187 in ntrip for trunk/BNC/src/bnclog.cpp
- Timestamp:
- Nov 9, 2026, 5:37:55 PM (less than one hour ago)
- File:
-
- 1 edited
-
trunk/BNC/src/bnclog.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnclog.cpp
r11185 r11187 21 21 #include "bnclog.h" 22 22 #include "bncutils.h" 23 #include "bnctime.h" 23 24 24 25 namespace { … … 211 212 // 212 213 //////////////////////////////////////////////////////////////////////////// 214 t_logRecord& t_logRecord::setEpoch(const bncTime& epoch) { 215 if (epoch.valid()) { 216 _epoch = QByteArray((epoch.datestr() + 'T' + epoch.timestr(3)).c_str()); 217 } 218 else { 219 _epoch.clear(); 220 } 221 return *this; 222 } 223 224 // 225 //////////////////////////////////////////////////////////////////////////// 213 226 const char* t_logRecord::levelString(e_level level) { 214 227 switch (level) { … … 254 267 QDateTime utc = gpst.addSecs(-gnumleap(dd.year(), dd.month(), dd.day())); 255 268 256 QByteArray msg = _msg; 269 QByteArray msg = _msgStructured.isEmpty() ? _msg : _msgStructured; 257 270 while (msg.startsWith('\n')) { 258 271 msg.remove(0, 1); … … 266 279 }; 267 280 put("time", utc.toString("yyyy-MM-ddThh:mm:ss.zzz").toLatin1() + "Z", true); 268 put("gpst", gpst.toString("yyyy-MM-ddThh:mm:ss.zzz").toLatin1(), true); 281 if (!_epoch.isEmpty()) { 282 put("epoch", _epoch, true); 283 } 269 284 put("level", levelString(_level), true); 270 285 put("component", _component, true); 271 286 put("event", _event, true); 272 287 if (!_stream.isEmpty()) { 273 put(" stream", _stream, true);288 put("mp", _stream, true); 274 289 } 275 290 all += _fields;
Note:
See TracChangeset
for help on using the changeset viewer.
