nightdomain / jmemcache-daemon

Automatically exported from code.google.com/p/jmemcache-daemon
Apache License 2.0
0 stars 0 forks source link

In verbose mode keys are printed non-readable (instance ids), add Key.toString #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
Any chance to get this changed?

Original comment by martin.grotzke on 9 Jun 2012 at 9:17