Puma在哪里登录

ale*_*no1 12 ruby logging webserver thin puma

我一直在使用Thin来运行我的ruby Sinatra应用程序,但我现在正在切换到Puma.Thin创建log/thin.log我自己使用的日志.我注意到Puma没有生成日志文件(不是我能看到的).我已经尝试使用谷歌搜索文档,但没有找到任何东西.

我想知道是否/如何在Puma中指定日志路径.

任何帮助将非常感激.

亚历克斯

Mom*_*mer 15

按照repo的自述文件中的建议检查示例config.rb.

如图所示:

# Redirect STDOUT and STDERR to files specified. The 3rd parameter
# (“append”) specifies whether the output is appended, the default is “false”.


stdout_redirect '/u/apps/lolcat/log/stdout', '/u/apps/lolcat/log/stderr'
stdout_redirect '/u/apps/lolcat/log/stdout', '/u/apps/lolcat/log/stderr', true
Run Code Online (Sandbox Code Playgroud)

  • 是否可以重定向到记录器(对象)而不是文件? (3认同)