2014-02-13 10 views
5

Warum sehe ich keine Rails-spezifischen Einträge in den Protokollen?Puma/fehlende Protokolle

Ich benutze Puma 2.7.1 mit Nginx-Proxy, auf einer normalen Debian-Box, nichts Schickes, Ruby 1.9.3 über RVM.

Meine puma config:

#!/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 

Ich fange Puma über:

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

Ich sehe:

[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... 

Ich betreibe:

tail -f log/puma* 

Ich sehe:

==> 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 

Aber ich sehe keine mehr Protokolle, nichts Anwendung verwendet.

Wenn die Anwendung eine Ausnahme auslöst, bekomme ich nichts in den Protokollen ... „tabula rasa“

Antwort

11

Rails hat eine separate Protokolldatei und melden Sie sich nicht auf die Puma-Protokoll. Standardmäßig protokolliert Rails eine Datei in logs/<environment>.log, z. log/production.log

+0

Haha, ja dein Recht natürlich ... Mein Gehirn war im Urlaub :) Ich habe die Protokolle wegen Syslog Config vermisst. Danke – astropanic

+0

Hi, was @dastropican sagen ist richtig. Ich stimme ihm jedoch nicht völlig zu. Wenn ich mir mein development.log ansehe, kann ich die Rails Logs sehen, aber ich kann die stdout Logs nicht sehen, im Beispiel kann ich die puts Nachrichten in meinem Code nicht sehen. Und vielleicht liegt es daran, dass ich keinen Fehler habe, aber ich kann die Fehler auch nicht sehen. Ich vermisse diese stdout und stderr Dateien (wie in Unicorn). – Rober

+0

Ich kann keine env-spezifische Protokolldatei sehen, wie @Holger es erwähnt hat. Ich benutze nginx & puma für Schienen – RAJ