加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 运营中心 > Nginx > 正文

ruby-on-rails – Puma /缺少日志

发布时间:2020-12-13 21:23:47 所属栏目:Nginx 来源:网络整理
导读:为什么我在日志中看不到任何Rails特定条目? 我正在使用Puma 2.7.1和Nginx代理,在正常的Debian盒子上,通过RVM没什么花哨的,ruby 1.9.3. 我的美洲狮配置: #!/usr/bin/env pumaenvironment 'sandbox'bind 'unix://tmp/puma.sock'stdout_redirect 'log/puma.lo

为什么我在日志中看不到任何Rails特定条目?

我正在使用Puma 2.7.1和Nginx代理,在正常的Debian盒子上,通过RVM没什么花哨的,ruby 1.9.3.

我的美洲狮配置:

#!/usr/bin/env puma
environment 'sandbox'
bind 'unix://tmp/puma.sock'
stdout_redirect 'log/puma.log','log/puma_error.log',true
pidfile 'tmp/pids/puma.pid'
state_path 'tmp/pids/puma.state'
daemonize true 
workers 4

我开始彪马通过:

bundle exec puma -C config/puma/config.rb

我知道了:

[23664] Puma starting in cluster mode...
[23664] * Version 2.7.1,codename: Earl of Sandwich Partition
[23664] * Min threads: 0,max threads: 16
[23664] * Environment: sandbox
[23664] * Process workers: 4
[23664] * Phased restart available
[23664] * Listening on unix://tmp/puma.sock
[23664] * Daemonizing...

我跑:

tail -f log/puma*

我知道了:

==> log/puma_error.log <==
X-Accel-Mapping header missing
=== puma startup: 2014-02-13 14:08:52 +0100 ===
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.

==> log/puma.log <==
=== puma startup: 2014-02-13 14:08:52 +0100 ===
[23670] - Worker 23678 booted,phase: 0
[23670] - Worker 23674 booted,phase: 0
[23670] - Worker 23686 booted,phase: 0
[23670] - Worker 23682 booted,phase: 0

但我没有看到任何更多的日志,没有任何应用程序相关.

当应用程序引发异常时,我在日志中什么也得不到……“tabula rasa”

最佳答案
Rails有一个单独的日志文件,不会登录到美洲日志.默认情况下,Rails会记录到logs /< environment> .log中的文件,例如登录/ production.log

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读