summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2018-07-31 17:20:09 +0200
committerGitHub <noreply@github.com>2018-07-31 17:20:09 +0200
commit7b41701eb83b13e5cc2dffef8e06b68df49ea391 (patch)
tree0821ebd6ddc49552597fd7b948a4ece53e30c393 /src
parente245ed9a44583c3772445e99ffa2b14407199287 (diff)
parent782928769187c977252c9f698535d824ac5409de (diff)
downloadredis-7b41701eb83b13e5cc2dffef8e06b68df49ea391.tar.gz
Merge pull request #5187 from oranagra/testsuite_improvements
Testsuite improvements
Diffstat (limited to 'src')
-rw-r--r--src/debug.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/debug.c b/src/debug.c
index 32be3c59c..a66390dbb 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -290,6 +290,7 @@ void debugCommand(client *c) {
"CRASH-AND-RECOVER <milliseconds> -- Hard crash and restart after <milliseconds> delay.",
"DIGEST -- Output a hex signature representing the current DB content.",
"ERROR <string> -- Return a Redis protocol error with <string> as message. Useful for clients unit tests to simulate Redis errors.",
+"LOG <message> -- write message to the server log.",
"HTSTATS <dbid> -- Return hash table statistics of the specified Redis database.",
"HTSTATS-KEY <key> -- Like htstats but for the hash table stored as key's value.",
"LOADAOF -- Flush the AOF buffers on disk and reload the AOF in memory.",
@@ -333,6 +334,9 @@ NULL
} else if (!strcasecmp(c->argv[1]->ptr,"assert")) {
if (c->argc >= 3) c->argv[2] = tryObjectEncoding(c->argv[2]);
serverAssertWithInfo(c,c->argv[0],1 == 2);
+ } else if (!strcasecmp(c->argv[1]->ptr,"log") && c->argc == 3) {
+ serverLog(LL_WARNING, "DEBUG LOG: %s", (char*)c->argv[2]->ptr);
+ addReply(c,shared.ok);
} else if (!strcasecmp(c->argv[1]->ptr,"reload")) {
rdbSaveInfo rsi, *rsiptr;
rsiptr = rdbPopulateSaveInfo(&rsi);