Print on console (rails s)

时间:2016-04-15 14:49:54

标签: ruby-on-rails

I'm creating a new app using Rails 5.

How can I debug using a Rails 5 app.

I mean my purpose is only to write on console when starting puma on development environments.

I have set

config.logger = Logger.new(STDERR)
config.log_level = :debug

but logger.debug "app" in my controllers seems not to be useful.

Has anyone try to write on server output with Rails 5 ?

Regards,

1 个答案:

答案 0 :(得分:0)

我还没试过过rails 5,但这篇博文看起来好像可以帮到你:

http://blog.bigbinary.com/2016/04/12/rails-5-allows-to-send-log-to-stdout-via-environment-variable.html