How to access Redis log file?

Better Stack Team
Updated on November 16, 2022

As many other services, Redis stores its log in the special log file. The location of the Redis log depends on the type of the installation.

With a default apt-get installation on Ubuntu 14.04, Redis log files are located at /var/log/redis/redis-server.log and you can display last 10 lines by running the following command:

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

With a default from-source installation on Ubuntu 14.04, Redis log files are located at /var/log/redis_6379.log and you can display the last 10 lines using the following command:

 
sudo tail /var/log/redis_6379.log

You can change the location of the Redis logs in the config file which you can access using one of the following commands:

 
redis-cli CONFIG GET *
 
tail -f `less  /etc/redis/redis.conf | grep logfile|cut -d\  -f2`
Got an article suggestion? Let us know
Explore more
Licensed under CC-BY-NC-SA

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

We are hiring.

Software is our way of making the world a tiny bit better. We build tools for the makers of tomorrow.

Explore all positions →