Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to redirect (Rack) Thin server output to console?

Thin server has -l option to redirect output to log file (default: log/thin.log). Is there a way like in webrick server the output is always to console (and log/development.log) too ?

like image 324
Daya Sharma Avatar asked Nov 09 '11 20:11

Daya Sharma


2 Answers

My installed version of Thin automatically outputs to the console. If yours doesn't, you could try updating your installed version.

You could also try thin -l -, which tells Thin to redirect output to STDOUT.

Hope this helps!

like image 193
ligfx Avatar answered Nov 15 '22 12:11

ligfx


If you're using rails, add this to your gemfile:

gem 'thin', :group => 'development'

And then from the console, use:

rails s

This will send logs to standard out and to log/development.log

Don't use "thin start", as some of the docs say.

like image 31
THEM Avatar answered Nov 15 '22 10:11

THEM