summaryrefslogtreecommitdiff
path: root/src/slowlog.h
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2017-06-15 12:57:54 +0200
committerantirez <antirez@gmail.com>2017-06-15 12:57:54 +0200
commit53cb27b1d718a12e9ff89212ca9b68db12031dde (patch)
tree788b70c5c35de134664f067aefcee9e0d86b36a8 /src/slowlog.h
parentab9d398835dca1187f190b28786cd9cc28e1fea1 (diff)
downloadredis-53cb27b1d718a12e9ff89212ca9b68db12031dde.tar.gz
SLOWLOG: log offending client address and name.
Diffstat (limited to 'src/slowlog.h')
-rw-r--r--src/slowlog.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/slowlog.h b/src/slowlog.h
index 81df0b054..e3781c67b 100644
--- a/src/slowlog.h
+++ b/src/slowlog.h
@@ -37,11 +37,13 @@ typedef struct slowlogEntry {
long long id; /* Unique entry identifier. */
long long duration; /* Time spent by the query, in nanoseconds. */
time_t time; /* Unix time at which the query was executed. */
+ sds cname; /* Client name. */
+ sds peerid; /* Client network address. */
} slowlogEntry;
/* Exported API */
void slowlogInit(void);
-void slowlogPushEntryIfNeeded(robj **argv, int argc, long long duration);
+void slowlogPushEntryIfNeeded(client *c, robj **argv, int argc, long long duration);
/* Exported commands */
void slowlogCommand(client *c);