Log the last command a client executed into the slowlog. */
| 4443 | |
| 4444 | /* Log the last command a client executed into the slowlog. */ |
| 4445 | void 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 | * |
no test coverage detected