How to view debug code in Thin console window?

南楼画角 提交于 2019-12-04 09:41:37

Yes. The solution with tail is normal, and you should use it.

You could also try to start your server this way :

rails server thin

It shows your log, in Rails 3 at least.

You can use a Procfile with foreman:

Procfile

web: thin start -p $PORT
logger: tail -f log/development.log

Example

$ foreman start -p 3000
Benj

The solution is to add a small code snippet in your config.ru file, and thin output all app logs to the console. You do not need to tail the log file, and it keeps log coloring intact

Details here: Thin server: ouput rails application logs to console, as 'rails s' does

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!