From ce82046a11521b0537ac2150a07a4de54aec883a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 21 Jun 2025 20:34:33 +0300 Subject: Improve verbose logging for protocol tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Enable real-time log output during simulation execution - Fix HeadlessProtocolRunner to properly show logs as they happen - Update LogCapture to format timestamps clearly - Add test-verbose.sh script for demonstrating logging - Remove duplicate log printing in verbose mode Now when running tests with -Dds.sim.verbose=true or option 3 in test-protocols.sh, users can see protocol actions as they occur. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/main/java/testing/LogCapture.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/testing/LogCapture.java') diff --git a/src/main/java/testing/LogCapture.java b/src/main/java/testing/LogCapture.java index 59f7ede..97bb127 100644 --- a/src/main/java/testing/LogCapture.java +++ b/src/main/java/testing/LogCapture.java @@ -62,7 +62,7 @@ public class LogCapture extends VSLogging { notifyListeners(entry); if (printLogs) { - System.out.println(logPrefix + entry); + System.out.println(String.format("[%5d] %s", time, message)); } } @@ -90,7 +90,8 @@ public class LogCapture extends VSLogging { notifyListeners(entry); if (printLogs) { - System.out.println(logPrefix + "[P" + process.getProcessNum() + "] " + message); + System.out.println(String.format("[%5d] Process %d: %s", + process.getTime(), process.getProcessNum(), message)); } } -- cgit v1.2.3