When running jmemcached in verbose mode the keys are printed like this:
5745 [New I/O server worker #7-2] INFO
com.thimbleware.jmemcached.protocol.MemcachedCommandHandler - GET
com.thimbleware.jmemcached.Key@7d35722a
To improve this Key should get a toString implementation, e.g.:
diff -r fcecde1e3e7a core/src/main/java/com/thimbleware/jmemcached/Key.java
--- a/core/src/main/java/com/thimbleware/jmemcached/Key.java Tue Feb 08
11:14:45 2011 -0500
+++ b/core/src/main/java/com/thimbleware/jmemcached/Key.java Sat Apr 23
15:40:31 2011 +0200
@@ -37,5 +37,9 @@
return hashCode;
}
+ @Override
+ public String toString() {
+ return new String( bytes.array() );
+ }
}
Original issue reported on code.google.com by martin.grotzke on 23 Apr 2011 at 1:44
Original issue reported on code.google.com by
martin.grotzke
on 23 Apr 2011 at 1:44