Redis:如何访问Redis日志文件 [英] Redis: How to access Redis log file
本文介绍了Redis:如何访问Redis日志文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 ubuntu 服务器上使用 ruby 设置了 Redis,但不知道如何访问其日志文件.教程说它应该在这里:
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
但甚至找不到/var/文件夹
But can't even find the /var/ folder
推荐答案
找到它:
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
这将输出文件的最后 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`
这篇关于Redis:如何访问Redis日志文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文