better colorization of interpreter logs
[fleet.git] / src / edu / berkeley / fleet / interpreter / Packet.java
index 5f44da2..d26b894 100644 (file)
@@ -15,11 +15,7 @@ class Packet {
     }
 
     public void send() {
-        if (isToken) {
-            Log.token(path.getSource(), path.getDestination());
-        } else {
-            Log.data(value+"", path.getSource(), path.getDestination());
-        }
+        Log.packet(this);
         ((InterpreterDestination)path.getDestination()).addDataFromFabric(this);
     }
 
@@ -27,6 +23,10 @@ class Packet {
         return path.getDestination();
     }
 
+    public Dock getSource() {
+        return path.getSource();
+    }
+
     public BitVector getSignal() {
         return path.getSignal();
     }