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`
-
How to Log to Stdout with Python?
If you are new to logging in Python, please feel free to start with our Introduction to Python logging to get started smoothly. Otherwise, here is how to log to Stdout with Python: Using Basic Conf...
Questions -
How To Log Uncaught Exceptions In Python?
For this, you can use the sys.excepthook that allows us to attach a handler for any unhandled exception: Creating a logger logger = logging.getLogger(name) logging.basicConfig(filename='e...
Questions -
Log.INFO vs. Log.DEBUG
When logging, logged messages are differentiated by their importance. In most logging frameworks we differentiate the following levels of importance: DEBUG - Lowest level. Fine-grained statements c...
Questions