From 53cb27b1d718a12e9ff89212ca9b68db12031dde Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 15 Jun 2017 12:57:54 +0200 Subject: SLOWLOG: log offending client address and name. --- src/slowlog.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/slowlog.h') 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); -- cgit v1.2.1