Dan Tenenbaum
2005-Dec-28 23:22 UTC
where is WEBrick (daemon mode) output? not in log/server.log
I am running WEBrick in daemon mode (with the -d option). Where is the server output that would ordinarily be on my console if I ran without the -d option? APP_ROOT/log/server.log is empty and not being appended to, though it is owned by the same user WEBrick is running as and has write permissions. The only files in APP_ROOT/log are: development.log production.log server.log test.log Where else could the output be? Thanks in advance...... -- Posted via http://www.ruby-forum.com/.
David Rupp
2005-Dec-29 00:41 UTC
Re: where is WEBrick (daemon mode) output? not in log/server.log
If you''re starting WEBrick with $RAILS_ROOT/script/server, it looks like the answer is /dev/null. If you''re using WEBrick.new() directly, you should be able to pass in the log_file as the first parameter. Take a look at the code in your Ruby installation (mine is at /usr/ local/lib/ruby/1.8/), under the webrick/ directory. webrick/server.rb has code to redirect STDIN, STDOUT, and STDERR to /dev/null when running in daemon mode. Also, webrick/log.rb defaults to a log_file of nil if one is not specified in the WEBrick::Log.new() call, which causes log output to go to STDERR. I don''t see a way to pass in an option to specify the logfile when starting with script/server. Anyone else have a line on this? This seems like too basic a thing to not be able to do. David On Dec 28, 2005, at 4:22 PM, Dan Tenenbaum wrote:> I am running WEBrick in daemon mode (with the -d option). Where is the > server output that would ordinarily be on my console if I ran without > the -d option? > APP_ROOT/log/server.log is empty and not being appended to, though > it is > owned by the same user WEBrick is running as and has write > permissions. > > The only files in APP_ROOT/log are: > development.log > production.log > server.log > test.log > > Where else could the output be? > Thanks in advance...... > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
David Rupp
2005-Dec-29 00:49 UTC
Re: where is WEBrick (daemon mode) output? not in log/server.log
This should read "...WEBrick::Log.new()...". Again, I don''t see a way to pass a specific log file through from the command line. On Dec 28, 2005, at 5:41 PM, David Rupp wrote:> If you''re using WEBrick.new() directly, you should be able to pass > in the log_file as the first parameter._______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails