File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -290,6 +290,7 @@ void debugCommand(client *c) {
290
290
"CRASH-AND-RECOVER <milliseconds> -- Hard crash and restart after <milliseconds> delay." ,
291
291
"DIGEST -- Output a hex signature representing the current DB content." ,
292
292
"ERROR <string> -- Return a Redis protocol error with <string> as message. Useful for clients unit tests to simulate Redis errors." ,
293
+ "LOG <message> -- write message to the server log." ,
293
294
"HTSTATS <dbid> -- Return hash table statistics of the specified Redis database." ,
294
295
"HTSTATS-KEY <key> -- Like htstats but for the hash table stored as key's value." ,
295
296
"LOADAOF -- Flush the AOF buffers on disk and reload the AOF in memory." ,
333
334
} else if (!strcasecmp (c -> argv [1 ]-> ptr ,"assert" )) {
334
335
if (c -> argc >= 3 ) c -> argv [2 ] = tryObjectEncoding (c -> argv [2 ]);
335
336
serverAssertWithInfo (c ,c -> argv [0 ],1 == 2 );
337
+ } else if (!strcasecmp (c -> argv [1 ]-> ptr ,"log" ) && c -> argc == 3 ) {
338
+ serverLog (LL_WARNING , "DEBUG LOG: %s" , (char * )c -> argv [2 ]-> ptr );
339
+ addReply (c ,shared .ok );
336
340
} else if (!strcasecmp (c -> argv [1 ]-> ptr ,"reload" )) {
337
341
rdbSaveInfo rsi , * rsiptr ;
338
342
rsiptr = rdbPopulateSaveInfo (& rsi );
You can’t perform that action at this time.
0 commit comments