How to see set/get/ in redis log

I used redis-cli monitor > redis.log and that works just fine for me, better than console.


Unless it's important that you get in the log, in which case I don't think I can help you, you should be able to use the MONITOR command:

MONITOR is a debugging command that streams back every command processed by the Redis server. It can help in understanding what is happening to the database. This command can both be used via redis-cli and via telnet.

You could do something like:

redis-cli monitor | grep -E ' "(g|s)et" '

Note that there is a performance cost, though (it's mentioned in the linked docs as roughly 50%).

Pipe it to a file:

redis-cli monitor | grep -E ' "(g|s)et" ' > redis_get_set.log