Changeset 11190 in ntrip for trunk/BNC/tests


Ignore:
Timestamp:
Nov 10, 2026, 9:21:30 AM (17 hours ago)
Author:
stuerze
Message:

Structured logging improved

Location:
trunk/BNC/tests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/tests/tools/logcheck.py

    r11189 r11190  
    99'epoch' after 'time', GPS Time without 'Z'), that the records belong line by
    1010line to the classic logfile ('msg' is the classic text without the "<mp>: "
    11 prefix, shortened for events whose fields carry the details, see matches();
     11prefix and trailing blanks, shortened for events whose fields carry the details, see matches();
    1212classic lines without their "yy-mm-dd hh:mm:ss " prefix; the start line is
    1313skipped, it goes to the file of the current date) and that 'time' (UTC) is the
    … …  
    7777}
    7878
     79SHORT_MSG = {"ppp_position": "PPP position", "stream_latency": "Latency"}
     80
    7981
    8082def matches(r, line):
    … …  
    8486    mp, msg, ev = r.get("mp"), r.get("msg"), r.get("event")
    8587    if ev in SHORT:
    86         return line.startswith(SHORT[ev](r))
     88        return msg == SHORT_MSG[ev] and line.startswith(SHORT[ev](r))
    8789    if ev == "stream_content" and "message_type" in r:
    8890        size = " (size %d)" % r["size"] if "size" in r else " "
    89         return msg == "Received message" and \
     91        return msg == "Received RTCM message" and \
    9092            line == "%s: Received message type %d%s" % (mp, r["message_type"], size)
    9193    if mp and line.startswith(mp + ": "):
    9294        line = line[len(mp) + 2:]
     95    line = line.rstrip(" ")
    9396    if ev.startswith("stream_outage_") or ev.startswith("stream_corrupted_"):
    9497        return line.startswith(msg + " ")
Note: See TracChangeset for help on using the changeset viewer.