Redis: How to access Redis log file

Christoffer picture Christoffer · May 2, 2013 · Viewed 127.1k times · Source

Have Redis setup with ruby on ubuntu server, but can't figure out how to access its log file. Tutorial says it should be here:

/var/log/redis_6379.log

But can't even find the /var/ folder

Answer

Christoffer picture Christoffer · May 2, 2013

Found it with:

sudo tail /var/log/redis/redis-server.log -n 100

So if the setup was more standard that should be:

sudo tail /var/log/redis_6379.log -n 100

This outputs the last 100 lines of the file.

Where your log file is located is in your configs that you can access with:

redis-cli CONFIG GET *

The log file may not always be shown using the above. In that case use

tail -f `less  /etc/redis/redis.conf | grep logfile|cut -d\  -f2`