&string_length, &flags, &rc);\r
if (rc == MEMCACHED_SUCCESS) \r
{\r
- if (opt_displayflag) \r
+ if (opt_displayflag)\r
+ {\r
+ if (opt_verbose)\r
+ printf("key: %.*s\nflags: ", argv[argc]);\r
printf("%d\n", flags);\r
+ }\r
else \r
{\r
+ if (opt_verbose)\r
+ printf("key: %.*s\nflags: %d\nlength: %d\nvalue: ",\r
+ argv[argc], flags, string_length);\r
printf("%.*s\n", string_length, string);\r
free(string);\r
}\r
else\r
ptr= argv[optind];\r
\r
+ if (opt_verbose) {\r
+ static char *opstr[] = { "set", "add", "replace" };\r
+ printf("op: %s\nsource file: %s\nlength: %d\n"\r
+ "key: %s\nflags: %d\n expires: %ld\n",\r
+ opstr[opt_replace], argv[optind], sbuf.st_size,\r
+ ptr, opt_flags, opt_expires);\r
+ }\r
+\r
if (opt_replace == 0)\r
rc= memcached_set(memc, ptr, strlen(ptr),\r
mptr, sbuf.st_size,\r
\r
while (optind <= argc) \r
{\r
+ if (opt_verbose) {\r
+ printf("key: %s\nexpires: %ld\n", argv[optind], expires);\r
+ }\r
rc = memcached_delete(memc, argv[optind], strlen(argv[optind]), expires);\r
optind++;\r
}\r