summaryrefslogtreecommitdiff
path: root/logger.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2016-12-30 12:29:28 -0800
committerdormando <dormando@rydia.net>2017-01-04 22:43:20 -0800
commit87a70654c176dfe984449b4b5c6c85cbddec469a (patch)
tree3759e34595d7a2bbac611622b704245cab95c730 /logger.h
parentbb174641e09feaafe80d86514375a552a5b47780 (diff)
downloadmemcached-87a70654c176dfe984449b4b5c6c85cbddec469a.tar.gz
fix store log and add ttl
the TTL is relative so you won't see the exact TTL on entry. Also fixes two off-by-one's for the status values.
Diffstat (limited to 'logger.h')
-rw-r--r--logger.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/logger.h b/logger.h
index 6b6907a..48f9954 100644
--- a/logger.h
+++ b/logger.h
@@ -10,6 +10,9 @@
#define LOGGER_ENTRY_MAX_SIZE 2048
#define GET_LOGGER() ((logger *) pthread_getspecific(logger_key));
+/* Inlined from memcached.h - should go into sub header */
+typedef unsigned int rel_time_t;
+
enum log_entry_type {
LOGGER_ASCII_CMD = 0,
LOGGER_EVICTION,
@@ -62,6 +65,7 @@ struct logentry_item_get {
struct logentry_item_store {
int status;
int cmd;
+ rel_time_t ttl;
uint8_t nkey;
char key[];
};