SLOWLOG RESET
Since 1.1.0Observability
Syntax
SLOWLOG RESETEmpties the slow log: SLOWLOG GET and SLOWLOG LEN start again from nothing. Use it before a test, or after reading the entries, so that what is logged next is new.
It does not turn the log off or change its settings: commands slower than slowlog-log-slower-than are still logged, and SLOWLOG RESET is logged itself when it qualifies, so with a threshold of 0 the log holds one entry straight after. Entry IDs carry on from where they were rather than starting at 0 again. The totals in INFO stats, slowlog_commands_count and slowlog_commands_time_ms_sum, are not reset; CONFIG RESETSTAT is the command for statistics.
Reply
OK.
Examples
> CONFIG SET slowlog-log-slower-than 0
OK
> SET a 1
OK
> GET a
"1"
> SLOWLOG RESET
OK
> SLOWLOG GET
1) 1) (integer) 2
2) (integer) 1794254762
3) (integer) 18
4) 1) "SLOWLOG"
2) "RESET"
5) "127.0.0.1:39490"
6) ""
7) (integer) 2