MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / slowlogPushCurrentCommand

Function slowlogPushCurrentCommand

src/server.cpp:4445–4455  ·  view source on GitHub ↗

Log the last command a client executed into the slowlog. */

Source from the content-addressed store, hash-verified

4443
4444/* Log the last command a client executed into the slowlog. */
4445void slowlogPushCurrentCommand(client *c, struct redisCommand *cmd, ustime_t duration) {
4446 /* Some commands may contain sensitive data that should not be available in the slowlog. */
4447 if (cmd->flags & CMD_SKIP_SLOWLOG)
4448 return;
4449
4450 /* If command argument vector was rewritten, use the original
4451 * arguments. */
4452 robj **argv = c->original_argv ? c->original_argv : c->argv;
4453 int argc = c->original_argv ? c->original_argc : c->argc;
4454 slowlogPushEntryIfNeeded(c,argv,argc,duration);
4455}
4456
4457/* Call() is the core of Redis execution of a command.
4458 *

Callers 2

callFunction · 0.85
updateStatsOnUnblockFunction · 0.85

Calls 1

slowlogPushEntryIfNeededFunction · 0.85

Tested by

no test coverage detected