英文:
Is there any way for setting the logfile via redis-cli but not editing the redis.config file?
问题
我尝试通过设置一个日志文件来修改运行中的Redis配置。由于Redis正在生产环境中运行,我无法编辑redis.config文件。我使用脚本更改了dbfilename参数。
英文:
I am trying to modify the running redis configuration by setting a logfile in it. I cannot edit the redis.config file as the redis is running on production. I changed the dbfilename parameter using the script.
答案1
得分: 3
你不能使用 CONFIG SET 来更改 logfile。你可以更改其他配置设置,包括 loglevel,但是不能更改 logfile,因为目前不支持。
你可以使用 CONFIG GET logfile 来查看当前的设置值。如果为空,它将输出到标准输出或终端。
有点巧妙,但你可以使用 gdb 来重定向输出。
英文:
You cannot change the logfile using CONFIG SET. You can change other config settings, including loglevel, but not logfile as it is currently unsupported.
You can use CONFIG GET logfile to see the current setting value. If empty, it is going to standard output or a TTY.
A little hackish, but you can redirect the output using gdb.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论