# Where is WEBrick (daemon mode) output? not in log/server.log

**URL:** <https://www.ruby-forum.com/t/where-is-webrick-daemon-mode-output-not-in-log-server-log/51271>\
**Category:** Rails\
**Created:** [December 29, 2005, 12:22am UTC](https://www.ruby-forum.com/t/where-is-webrick-daemon-mode-output-not-in-log-server-log/51271 "2005-12-29T00:22:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dandante](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9fc29f/32.png) [@dandante](https://www.ruby-forum.com/u/dandante)\
**Post date:** [December 29, 2005, 12:22am UTC](https://www.ruby-forum.com/t/where-is-webrick-daemon-mode-output-not-in-log-server-log/51271/1 "2005-12-29T00:22:38Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![dandante](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9fc29f/32.png) [@dandante](https://www.ruby-forum.com/u/dandante)\
**Post date:** [December 29, 2005, 1:49am UTC](https://www.ruby-forum.com/t/where-is-webrick-daemon-mode-output-not-in-log-server-log/51271/2 "2005-12-29T01:49:30Z")

</div>

This should read “…WEBrick::Log.new()…”. Again, I don’t see a way  
to pass a specific log file through from the command line.

---

<div class="post-metadata">

**Author:** ![dandante](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/9fc29f/32.png) [@dandante](https://www.ruby-forum.com/u/dandante)\
**Post date:** [December 29, 2005, 1:43am UTC](https://www.ruby-forum.com/t/where-is-webrick-daemon-mode-output-not-in-log-server-log/51271/3 "2005-12-29T01:43:26Z")

</div>

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
