summaryrefslogtreecommitdiff
path: root/src/main/java/testing/LogCapture.java
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-21 20:34:33 +0300
committerPaul Buetow <paul@buetow.org>2025-06-21 20:34:33 +0300
commitce82046a11521b0537ac2150a07a4de54aec883a (patch)
tree73b420d63f6eadc006a75f7129ebe04762721c3f /src/main/java/testing/LogCapture.java
parentf0e31d4de0c8e206260467420257a6f04ffc8e90 (diff)
Improve verbose logging for protocol tests
- 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 <noreply@anthropic.com>
Diffstat (limited to 'src/main/java/testing/LogCapture.java')
-rw-r--r--src/main/java/testing/LogCapture.java5
1 files changed, 3 insertions, 2 deletions
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));
}
}