我一直在使用Thin运行我的ruby Sinatra应用程序,但现在我要转换到Puma。Thin创建自己的日志文件log/thin.log
,我会使用它。我注意到Puma没有生成日志文件(至少我看不到)。我尝试搜索有关此方面的文档,但并没有找到什么有用的信息。
我想知道怎样在Puma中指定日志路径。
非常感谢任何帮助。
Alex
如上所示:
# 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
log = Syslog::Logger.new 'my_app'; log_formatter { |s| log.info s; s }
。 - Mike