diff --git a/dmemcache.inc b/dmemcache.inc
index b634c25..65fc53a 100644
--- a/dmemcache.inc
+++ b/dmemcache.inc
@@ -42,6 +42,13 @@ function dmemcache_set($key, $value, $exp = 0, $bin = 'cache') {
}
}
$_memcache_statistics[] = array('set', $bin, $full_key, (int)$success);
+
+ if ($success === FALSE) {
+ $item_size = strlen(serialize($value));
+ watchdog('memcache', 'Cache set attempt failed. Key: !key. Cache bin: !bin. Item size (uncompressed): !kb KB.',
+ array('!key' => $key, '!bin' => $bin, '!kb' => round($item_size/1024)), WATCHDOG_WARNING);
+ }
+
return $success;
}