Fix server messages (clean up errors in general).
[m6w6/libmemcached] / libmemcachedutil-1.0 / ostream.hpp
index 41134140c70f4f145e494c47df055099caa2fd14..cce7bfcdc97637cfce78607d50ac6c36aa38d082 100644 (file)
@@ -41,3 +41,10 @@ static inline std::ostream& operator<<(std::ostream& output, const enum memcache
   output << memcached_strerror(NULL, arg);
   return output;
 }
+
+static inline std::ostream& operator<<(std::ostream& output, const memcached_st &arg)
+{
+  output << " query_id: " <<  memcached_query_id(&arg);
+  output << " error: " <<  memcached_last_error_message(&arg);
+  return output;
+}