Redis启动日志更简洁



当我使用Redis通过Foreman启动一堆其他进程时,我发现它在启动时的输出非常冗长。

Redis向stdout写入的行数是我的Procfile中任何其他进程的两倍多,这主要是因为打印到日志中的ASCII艺术。

是否有(启动(选项可以保持日志更简洁,例如关闭徽标的输出?

TLDR:如果您有redis 4.0或更高版本,您可以使用redis-server | cat来欺骗它,使其认为它没有在tty中运行。

原始答案:

我在配置文档中做了一个快速检查,你不应该看到这个。你可以检查一下你的配置文件,看看你是否已经将always-show-logo设置为yes吗?

随附的评论如下:

# By default Redis shows an ASCII art logo only when started to log to the
# standard output and if the standard output is a TTY. Basically this means
# that normally a logo is displayed only in interactive sessions.
#
# However it is possible to force the pre-4.0 behavior and always show a
# ASCII art logo in startup logs by setting the following option to yes.

我想如果你在一个版本<4.0那么这也许可以解释你所看到的。

以下是2014年的问题/修复https://github.com/antirez/redis/issues/1935

最新更新