Log the last command a client executed into the slowlog. */
| 3653 | |
| 3654 | /* Log the last command a client executed into the slowlog. */ |
| 3655 | void slowlogPushCurrentCommand(client *c, struct redisCommand *cmd, ustime_t duration) { |
| 3656 | /* Some commands may contain sensitive data that should not be available in the slowlog. */ |
| 3657 | if (cmd->flags & CMD_SKIP_SLOWLOG) |
| 3658 | return; |
| 3659 | |
| 3660 | /* If command argument vector was rewritten, use the original |
| 3661 | * arguments. */ |
| 3662 | robj **argv = c->original_argv ? c->original_argv : c->argv; |
| 3663 | int argc = c->original_argv ? c->original_argc : c->argc; |
| 3664 | slowlogPushEntryIfNeeded(c,argv,argc,duration); |
| 3665 | } |
| 3666 | |
| 3667 | /* Call() is the core of Redis execution of a command. |
| 3668 | * |
no test coverage detected