Timestamps for the launch-chain logs (operator request)

Every relay/console print now carries a wall-clock prefix (_StampedOut
stdout wrapper; the GUI monitor regexes use search() so the prefix is
transparent), and the pod's READY/pend lines carry wall time + tick --
post-mortems measure delays instead of guessing (the 3m40s load
reconstruction needed heartbeat-counting archaeology).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-22 20:10:38 -05:00
co-authored by Claude Opus 4.8
parent 224eaff5f8
commit 54fd4a4ab0
3 changed files with 41 additions and 4 deletions
+29
View File
@@ -1130,7 +1130,36 @@ def relay_main(argv):
return 0
class _StampedOut:
"""Line-timestamping stdout wrapper: every log line gets a wall-clock
prefix so post-mortems can measure delays instead of guessing (operator
request 2026-07-22). The GUI's monitor regexes all use .search(), so
the prefix is transparent to them."""
def __init__(self, inner):
self._inner = inner
self._at_line_start = True
def write(self, text):
out = []
for ch in text:
if self._at_line_start and ch != "\n":
out.append(time.strftime("%H:%M:%S "))
self._at_line_start = False
out.append(ch)
if ch == "\n":
self._at_line_start = True
self._inner.write("".join(out))
def flush(self):
self._inner.flush()
def __getattr__(self, name):
return getattr(self._inner, name)
def main():
sys.stdout = _StampedOut(sys.stdout)
if len(sys.argv) >= 2 and sys.argv[1] == "--relay":
return relay_main(sys.argv[2:])
if len(sys.argv) < 3: