diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-20 21:22:10 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-20 21:22:10 +0000 |
| commit | e2f8fdc3156040f47264871ded692a3fb90df779 (patch) | |
| tree | c0a3404515822f1526bab5e8bfe1a09e63678972 /sources/core | |
| parent | 263d8a4f43ed2d319a88bd11e05112daf8133aa2 (diff) | |
Loggin texts cleaned.
Diffstat (limited to 'sources/core')
| -rw-r--r-- | sources/core/VSMessage.java | 13 | ||||
| -rw-r--r-- | sources/core/VSProcess.java | 5 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sources/core/VSMessage.java b/sources/core/VSMessage.java index ab6bca8..95bcc7a 100644 --- a/sources/core/VSMessage.java +++ b/sources/core/VSMessage.java @@ -12,6 +12,7 @@ public class VSMessage extends VSPrefs { private static long messageCounter; private long lamportTime; private VSVectorTime vectorTime; + private VSPrefs prefs; public VSMessage(String protocolClassname) { this.protocolClassname = protocolClassname; @@ -20,6 +21,7 @@ public class VSMessage extends VSPrefs { public void init(VSProcess process) { this.sendingProcess = process; + this.prefs = process.getPrefs(); lamportTime = sendingProcess.getLamportTime(); vectorTime = sendingProcess.getVectorTime().getCopy(); } @@ -49,7 +51,16 @@ public class VSMessage extends VSPrefs { } public String toString() { - return "ID: " + messageID; + StringBuffer buffer = new StringBuffer(); + + buffer.append("ID: "); + buffer.append(messageID); + buffer.append("; "); + buffer.append(prefs.getString("lang.protocol")); + buffer.append(": "); + buffer.append(VSRegisteredEvents.getShortname(getProtocolClassname())); + + return buffer.toString(); } public String toStringFull() { diff --git a/sources/core/VSProcess.java b/sources/core/VSProcess.java index aa754a2..dbb37ba 100644 --- a/sources/core/VSProcess.java +++ b/sources/core/VSProcess.java @@ -466,11 +466,6 @@ public final class VSProcess extends VSPrefs { StringBuffer buffer = new StringBuffer(); buffer.append(prefs.getString("lang.message.sent")); buffer.append("; "); - buffer.append(prefs.getString("lang.protocol")); - buffer.append(": " + message.getName()); - buffer.append("; "); - buffer.append(prefs.getString("lang.message")); - buffer.append(" "); buffer.append(message.toStringFull()); logg(buffer.toString()); simulationPanel.sendMessage(message); |
