diff --git a/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/edu/uci/ics/asterix/recordmanagergenerator/Generator.java b/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/edu/uci/ics/asterix/recordmanagergenerator/Generator.java
index 14d8a7e..f1eb9c6 100644
--- a/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/edu/uci/ics/asterix/recordmanagergenerator/Generator.java
+++ b/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/edu/uci/ics/asterix/recordmanagergenerator/Generator.java
@@ -139,6 +139,9 @@
                         sb.append('\n');
                     }
                 }
+            } else if (line.contains("@PRINT_RECORD@")) {
+                resource.appendRecordPrinter(sb, indent, 1);
+                sb.append('\n');
             } else {
                 sb.append(line).append('\n');
             }
diff --git a/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/edu/uci/ics/asterix/recordmanagergenerator/RecordType.java b/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/edu/uci/ics/asterix/recordmanagergenerator/RecordType.java
index f45f509..a3d065c 100644
--- a/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/edu/uci/ics/asterix/recordmanagergenerator/RecordType.java
+++ b/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/java/edu/uci/ics/asterix/recordmanagergenerator/RecordType.java
@@ -29,18 +29,19 @@
 public class RecordType {
     
     enum Type {
-        BYTE  (1, "byte",  "get",      "put",      "(byte)0xde",          "TypeUtil.Byte.append"),
-        SHORT (2, "short", "getShort", "putShort", "(short)0xdead",       "TypeUtil.Short.append"),
-        INT   (4, "int",   "getInt",   "putInt",   "0xdeadbeef",          "TypeUtil.Int.append"),
-        GLOBAL(8, "long",  "getLong",  "putLong",  "0xdeadbeefdeadbeefl", "TypeUtil.Global.append");
+        BYTE  (1, "byte",  "get",      "put",      "(byte)0xde",          "TypeUtil.Byte.append",   "TypeUtil.Byte.appendFixed"),
+        SHORT (2, "short", "getShort", "putShort", "(short)0xdead",       "TypeUtil.Short.append",  "TypeUtil.Short.appendFixed"),
+        INT   (4, "int",   "getInt",   "putInt",   "0xdeadbeef",          "TypeUtil.Int.append",    "TypeUtil.Int.appendFixed"),
+        GLOBAL(8, "long",  "getLong",  "putLong",  "0xdeadbeefdeadbeefl", "TypeUtil.Global.append", "TypeUtil.Global.appendFixed");
         
-        Type(int size, String javaType, String bbGetter, String bbSetter, String deadMemInitializer, String appender) {
+        Type(int size, String javaType, String bbGetter, String bbSetter, String deadMemInitializer, String appender, String tabAppender) {
             this.size = size;
             this.javaType = javaType;
             this.bbGetter = bbGetter;
             this.bbSetter = bbSetter;
             this.deadMemInitializer = deadMemInitializer;
             this.appender = appender;
+            this.tabAppender = tabAppender;
         }
         
         int size;
@@ -49,6 +50,7 @@
         String bbSetter;
         String deadMemInitializer;
         String appender;
+        String tabAppender;
     }
     
     static class Field {
@@ -374,7 +376,7 @@
               .append(");\n");
             sb = indent(sb, indent, level + 1);
             sb.append("sb = ")
-              .append(field.type.appender)
+              .append(field.type.tabAppender)
               .append("(sb, value);\n");
             sb = indent(sb, indent, level + 1);
             sb.append("sb.append(\" | \");\n");
@@ -385,4 +387,37 @@
         }
         return sb;
     }
+    
+    StringBuilder appendRecordPrinter(StringBuilder sb, String indent, int level) {
+        sb = indent(sb, indent, level);
+        sb.append("public StringBuilder appendRecord(StringBuilder sb, long slotNum) {\n");
+        
+        sb = indent(sb, indent, level + 1);
+        sb.append("sb.append(\"{ \");\n\n");
+        
+        for (int i = 0; i < fields.size(); ++i) {
+            Field field = fields.get(i);
+            if (field.accessible) {
+                if (i > 0) {
+                    sb = indent(sb, indent, level + 1);
+                    sb.append("sb.append(\", \");\n\n");                
+                }
+                sb = indent(sb, indent, level + 1);
+                sb.append("sb.append(\"\\\"").append(field.name).append("\\\" : \\\"\");\n");
+                sb = indent(sb, indent, level + 1);
+                sb.append("sb = ").append(field.type.appender).append("(sb, ");
+                sb.append(field.methodName("get")).append("(slotNum)");
+                sb.append(");\n");
+                sb = indent(sb, indent, level + 1);
+                sb.append("sb.append(\"\\\"\");\n\n");
+            }
+        }
+        sb = indent(sb, indent, level + 1);
+        sb.append("return sb.append(\" }\");\n");
+
+        sb = indent(sb, indent, level);
+        sb.append("}");
+        
+        return sb;
+    }
 }
diff --git a/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/resources/ArenaManager.java b/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/resources/ArenaManager.java
index 3ac410c..a950d30 100644
--- a/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/resources/ArenaManager.java
+++ b/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/resources/ArenaManager.java
@@ -102,6 +102,8 @@
         return get(arenaId).getAllocInfo(TypeUtil.Global.localId(slotNum));
     }
     
+    @PRINT_RECORD@
+    
     public StringBuilder append(StringBuilder sb) {
         for (int i = 0; i < noArenas; ++i) {
             sb.append("++++ arena ").append(i).append(" ++++\n");
diff --git a/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/resources/TypeUtil.java b/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/resources/TypeUtil.java
index c1423a1..f5d9734 100644
--- a/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/resources/TypeUtil.java
+++ b/asterix-maven-plugins/record-manager-generator-maven-plugin/src/main/resources/TypeUtil.java
@@ -4,18 +4,30 @@
     
     public static class Byte {
         public static StringBuilder append(StringBuilder sb, byte b) {
+            return sb.append(String.format("%1$x", b));
+        }
+
+        public static StringBuilder appendFixed(StringBuilder sb, byte b) {
             return sb.append(String.format("%1$18x", b));
         }
     }
 
     public static class Short {
         public static StringBuilder append(StringBuilder sb, short s) {
+            return sb.append(String.format("%1$x", s));
+        }
+
+        public static StringBuilder appendFixed(StringBuilder sb, short s) {
             return sb.append(String.format("%1$18x", s));
         }
     }
 
     public static class Int {
         public static StringBuilder append(StringBuilder sb, int i) {
+            return sb.append(String.format("%1$x", i));
+        }
+
+        public static StringBuilder appendFixed(StringBuilder sb, int i) {
             return sb.append(String.format("%1$18x", i));
         }
     }
@@ -43,6 +55,15 @@
         }
         
         public static StringBuilder append(StringBuilder sb, long l) {
+            sb.append(String.format("%1$x", TypeUtil.Global.arenaId(l)));
+            sb.append(':');
+            sb.append(String.format("%1$x", TypeUtil.Global.allocId(l)));
+            sb.append(':');
+            sb.append(String.format("%1$x", TypeUtil.Global.localId(l)));
+            return sb;
+        }
+        
+        public static StringBuilder appendFixed(StringBuilder sb, long l) {
             sb.append(String.format("%1$4x", TypeUtil.Global.arenaId(l)));
             sb.append(':');
             sb.append(String.format("%1$4x", TypeUtil.Global.allocId(l)));
diff --git a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/ConcurrentLockManager.java b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/ConcurrentLockManager.java
index d955ab2..d4fa95b 100644
--- a/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/ConcurrentLockManager.java
+++ b/asterix-transactions/src/main/java/edu/uci/ics/asterix/transaction/management/service/locking/ConcurrentLockManager.java
@@ -681,7 +681,7 @@
         if (holder < 0) {
             throw new IllegalStateException("no holder for resource " + resource);
         }
-
+        LOGGER.warning(resQueueToString(resource));
         // remove from the list of holders for a resource
         if (requestMatches(holder, jobSlot, lockMode)) {
             // if the head of the queue matches, we need to update the resource
@@ -854,12 +854,12 @@
         return holder;
     }
 
-    private String resQueueToString(long head) {
-        return appendResQueue(new StringBuilder(), head).toString();
+    private String resQueueToString(long resSlot) {
+        return appendResQueue(new StringBuilder(), resSlot).toString();
     }
     
     private StringBuilder appendResQueue(StringBuilder sb, long resSlot) {
-        appendResource(sb, resSlot);
+        resArenaMgr.appendRecord(sb, resSlot);
         sb.append("\n");
         appendReqQueue(sb, resArenaMgr.getLastHolder(resSlot));
         return sb;
@@ -867,93 +867,13 @@
     
     private StringBuilder appendReqQueue(StringBuilder sb, long head) {
         while (head != -1) {
-            appendRequest(sb, head);
+            reqArenaMgr.appendRecord(sb, head);
             sb.append("\n");
             head = reqArenaMgr.getNextRequest(head);
         }
         return sb;
     }
     
-    private void appendResource(StringBuilder sb, long resSlot) {
-        sb.append("{ ");
-
-        sb.append(" \"dataset id\"");
-        sb.append(" : \"");
-        sb.append(resArenaMgr.getDatasetId(resSlot));
-
-        sb.append("\", ");
-
-        sb.append(" \"pk hash val\"");
-        sb.append(" : \"");
-        sb.append(resArenaMgr.getPkHashVal(resSlot));
-
-        sb.append("\", ");
-
-        sb.append(" \"max mode\"");
-        sb.append(" : \"");
-        sb.append(LockMode.toString((byte)resArenaMgr.getMaxMode(resSlot)));
-
-        sb.append("\", ");
-
-        sb.append(" \"last holder\"");
-        sb.append(" : \"");
-        TypeUtil.Global.append(sb, resArenaMgr.getLastHolder(resSlot));
-
-        sb.append("\", ");
-
-        sb.append(" \"first waiter\"");
-        sb.append(" : \"");
-        TypeUtil.Global.append(sb, resArenaMgr.getFirstWaiter(resSlot));
-
-        sb.append("\", ");
-
-        sb.append(" \"first upgrader\"");
-        sb.append(" : \"");
-        TypeUtil.Global.append(sb, resArenaMgr.getFirstUpgrader(resSlot));
-
-        sb.append("\", ");
-
-        sb.append(" \"next\"");
-        sb.append(" : \"");
-        TypeUtil.Global.append(sb, resArenaMgr.getNext(resSlot));
-
-        sb.append("\" }");
-    }
-
-    private void appendRequest(StringBuilder sb, long reqSlot) {
-        sb.append("{ ");
-        
-        sb.append(" \"resource id\"");
-        sb.append(" : \"");
-        TypeUtil.Global.append(sb, reqArenaMgr.getResourceId(reqSlot));
-
-        sb.append("\", ");
-
-        sb.append(" \"lock mode\"");
-        sb.append(" : \"");
-        sb.append(LockMode.toString((byte)reqArenaMgr.getLockMode(reqSlot)));
-
-        sb.append("\", ");
-
-        sb.append(" \"job slot\"");
-        sb.append(" : \"");
-        TypeUtil.Global.append(sb, reqArenaMgr.getJobSlot(reqSlot));
-
-        sb.append("\", ");
-
-        sb.append(" \"prev job request\"");
-        sb.append(" : \"");
-        TypeUtil.Global.append(sb, reqArenaMgr.getPrevJobRequest(reqSlot));
-
-        sb.append("\", ");
-
-        sb.append(" \"next job request\"");
-        sb.append(" : \"");
-        TypeUtil.Global.append(sb, reqArenaMgr.getNextJobRequest(reqSlot));
-        
-        sb.append("\" }");
-    }
-
     private int determineNewMaxMode(long resource, int oldMaxMode) {
         int newMaxMode = LockMode.NL;
         long holder = resArenaMgr.getLastHolder(resource);
