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 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='example.log...
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 -
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
Make your mark
Join the writer's program
Are you a developer and love writing and sharing your knowledge with the world? Join our guest writing program and get paid for writing amazing technical guides. We'll get them to the right readers that will appreciate them.
Write for usBuild on top of Better Stack
Write a script, app or project on top of Better Stack and share it with the world. Make a public repository and share it with us at our email.
community@betterstack.comor submit a pull request and help us build better products for everyone.
See the full list of amazing projects on github