Application logs
jonathansimmons opened this issue · comments
I'd really like to use puma-dev but from all my testing I can't get a full server request log. The readme says you can tails the logs at: ~/Library/Logs/puma-dev.log
but when I do that all I get is the initial server boot and an "!App 'app-name' booted" notice. Subsequent page loads are not tracked...
What am I missing?
jonathan@Jonathans-MacBook-Pro ~/app-directory tail -f ~/Library/Logs/puma-dev.log
app-name[18687]: tput: No value for $TERM and no -T specified
app-name[18687]: tput: No value for $TERM and no -T specified
app-name[18687]: tput: No value for $TERM and no -T specified
app-name[18687]: Puma starting in single mode...
app-name[18687]: * Version 3.12.0 (ruby 2.6.1-p33), codename: Llamas in Pajamas
app-name[18687]: * Min threads: 0, max threads: 5
app-name[18687]: * Environment: development
app-name[18687]: * Listening on unix:/Users/jonathan/.puma-dev/app-name/tmp/puma-dev-18613.sock
app-name[18687]: Use Ctrl-C to stop
! App 'app-name' booted
I've investigated a bit and it seems related to fact that puma is not logging to stdout by itself without config file..
If you start it with rails server
, it logs to stdout, but if you start via bundle exec puma
it doesn't output to stdout.
See here: https://github.com/puma/puma-dev/blob/master/dev/app.go#L255
I'm not sure whats the best way to start/fix here... Couldn't get it working to output to stdout via a config/puma.rb
file
My puma-dev instance logs to the Rails application logs by default once the app boot process completes (i.e. log/development.log
). I look to the puma-dev log (~/Library/Logs/puma-dev.log
) for app loading/configuration issues and the app log for app related issues.
Yeah Rails won't log to STDOUT
by default so either change the behaviour of the Rails logger or use the log/development.log
file.