- Timestamp:
- Nov 10, 2026, 9:21:30 AM (7 hours ago)
- Location:
- trunk/BNC
- Files:
-
- 8 edited
-
CHANGELOG.md (modified) (1 diff)
-
src/bncgetthread.cpp (modified) (1 diff)
-
src/bnchelp.html (modified) (1 diff)
-
src/bnclog.cpp (modified) (1 diff)
-
src/latencychecker.cpp (modified) (1 diff)
-
tests/cases/log_structured/expected/PPPQuickStart.jsonl.gz (modified) ( previous)
-
tests/cases/log_structured/expected/PPPQuickStart.logfmt.gz (modified) ( previous)
-
tests/tools/logcheck.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/CHANGELOG.md
r11189 r11190 1 1 # Changelog 2 2 ## 2.13.8 (2026-11-04) 3 - ADDED: **Structured logfile** (General options 'Structured logfile', 'Format' and 'Min. level', keys logFileStructured, logFormatStructured and logLevelStructured): in addition to the unchanged logfile, the same records as JSON Lines ('json', default) or key=value pairs ('logfmt'), one appended file without date for rotation by logrotate & co (reopened if moved or removed); each record has the time in UTC ('time'), for records of a data epoch its GPS Time ('epoch'), level, component, event, mountpoint ('mp'), the event's fields, the logfile text ('msg', without the leading mountpoint and shortened where the fields carry the details, e.g. 'PPP position') and a version ('v'). Events with fields: ppp_position, ppp_epoch_failed, stream_format, stream_content (RTCM scan, with message_type and size of the received message types), stream_timeout, stream_outage_begin/end, stream_corrupted_begin/end, stream_latency; all other messages as event 'message' with the component of their origin (stream, ntrip, bce, ssr, ppp, cmb, upload, ssrqc, bnc) and a level (error: a function does not work; warning: data or configuration problem, BNC continues; info: status); messages of the BNC_DEBUG_BCE/OBS/CMB defines with level 'debug' and component bce/obs/cmb. Test case log_structured and check tests/tools/logcheck.py 3 - ADDED: **Structured logfile** (General options 'Structured logfile', 'Format' and 'Min. level', keys logFileStructured, logFormatStructured and logLevelStructured): in addition to the unchanged logfile, the same records as JSON Lines ('json', default) or key=value pairs ('logfmt'), one appended file without date for rotation by logrotate & co (reopened if moved or removed); each record has the time in UTC ('time'), for records of a data epoch its GPS Time ('epoch'), level, component, event, mountpoint ('mp'), the event's fields, the logfile text ('msg', without the leading mountpoint and trailing blanks, shortened where the fields carry the details, e.g. 'PPP position') and a version ('v'). Events with fields: ppp_position, ppp_epoch_failed, stream_format, stream_content (RTCM scan, with message_type and size of the received message types), stream_timeout, stream_outage_begin/end, stream_corrupted_begin/end, stream_latency; all other messages as event 'message' with the component of their origin (stream, ntrip, bce, ssr, ppp, cmb, upload, ssrqc, bnc) and a level (error: a function does not work; warning: data or configuration problem, BNC continues; info: status); messages of the BNC_DEBUG_BCE/OBS/CMB defines with level 'debug' and component bce/obs/cmb. Test case log_structured and check tests/tools/logcheck.py 4 4 - FIXED: Build with BNC_DEBUG_BCE: undeclared message number in the debug messages of the Galileo ephemeris decoder 5 5 - ADDED: **epoch/velocity fields to PPP coordinates file to allow BNC to propagate the reference coordinates** related to a dedicated reference epoch to the current processing epoch internally; coordinates can also be given as latitude/longitude/height -
trunk/BNC/src/bncgetthread.cpp
r11187 r11190 840 840 t_logRecord rec(t_logRecord::info, "stream", "stream_content", _staID, 841 841 _staID + ": Received message type " + type.toLatin1() + size.toLatin1()); 842 rec.setStructuredMsg("Received message"); 842 rec.setStructuredMsg("Received RTCM message"); 843 843 rec.add("message_type", int(decoder()->_typeList[ii]._type)); 844 844 if (decoder()->_typeList[ii]._size) { -
trunk/BNC/src/bnchelp.html
r11189 r11190 2818 2818 <li>'mp': the mountpoint of the stream or the PPP station, if known,</li> 2819 2819 <li>the fields of the event,</li> 2820 <li>'msg': the text of the record in the logfile, without the leading mountpoint ('<mp>: ') and shortened 2821 for events whose fields carry the details: 'PPP position' (ppp_position), 'Received message' (message types 2822 of the RTCM scan), ' Mean latency' (stream_latency), 'Failure threshold exceeded, outage' / 'corrupted' and2820 <li>'msg': the text of the record in the logfile, without the leading mountpoint ('<mp>: ') and trailing blanks, shortened 2821 for events whose fields carry the details: 'PPP position' (ppp_position), 'Received RTCM message' (message types 2822 of the RTCM scan), 'Latency' (stream_latency), 'Failure threshold exceeded, outage' / 'corrupted' and 2823 2823 'Recovery threshold exceeded, outage ended' / 'corruption ended' (stream_outage_*, stream_corrupted_*),</li> 2824 2824 <li>'v': the version of the record layout, currently 1.</li> -
trunk/BNC/src/bnclog.cpp
r11189 r11190 275 275 msg.remove(0, _stream.size() + 2); 276 276 } 277 // no trailing blanks (e.g. RTCM scan: "Receiver Serial Number: 1831551 ") 278 while (msg.endsWith(' ')) { 279 msg.chop(1); 280 } 277 281 278 282 QVector<t_field> all; -
trunk/BNC/src/latencychecker.cpp
r11189 r11190 567 567 } 568 568 t_logRecord rec(t_logRecord::info, "stream", "stream_latency", _staID, text.toLatin1()); 569 rec.setStructuredMsg(" Mean latency");569 rec.setStructuredMsg("Latency"); 570 570 rec.add("type", l._type) 571 571 .add("mean", mean, 2) -
trunk/BNC/tests/tools/logcheck.py
r11189 r11190 9 9 'epoch' after 'time', GPS Time without 'Z'), that the records belong line by 10 10 line to the classic logfile ('msg' is the classic text without the "<mp>: " 11 prefix, shortened for events whose fields carry the details, see matches(); 11 prefix and trailing blanks, shortened for events whose fields carry the details, see matches(); 12 12 classic lines without their "yy-mm-dd hh:mm:ss " prefix; the start line is 13 13 skipped, it goes to the file of the current date) and that 'time' (UTC) is the … … 77 77 } 78 78 79 SHORT_MSG = {"ppp_position": "PPP position", "stream_latency": "Latency"} 80 79 81 80 82 def matches(r, line): … … 84 86 mp, msg, ev = r.get("mp"), r.get("msg"), r.get("event") 85 87 if ev in SHORT: 86 return line.startswith(SHORT[ev](r)) 88 return msg == SHORT_MSG[ev] and line.startswith(SHORT[ev](r)) 87 89 if ev == "stream_content" and "message_type" in r: 88 90 size = " (size %d)" % r["size"] if "size" in r else " " 89 return msg == "Received message" and \ 91 return msg == "Received RTCM message" and \ 90 92 line == "%s: Received message type %d%s" % (mp, r["message_type"], size) 91 93 if mp and line.startswith(mp + ": "): 92 94 line = line[len(mp) + 2:] 95 line = line.rstrip(" ") 93 96 if ev.startswith("stream_outage_") or ev.startswith("stream_corrupted_"): 94 97 return line.startswith(msg + " ")
Note:
See TracChangeset
for help on using the changeset viewer.
