I'm writing a WEBrick server that I want to output some status
information to the console. However, all the *other* stuff that's
getting output makes my information hard to see. Even after adding
to the server configuration what I *thought* was supposed to make
it only output for fatal errors, I still get the line with my hostname,
the current time, and the request string.
How can I make this go away?
-Morgan.
"Ginger ale. And leave the bottle."
···
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.1/136 - Release Date: 10/15/2005
I'm writing a WEBrick server that I want to output some status
information to the console. However, all the *other* stuff that's
getting output makes my information hard to see. Even after adding
to the server configuration what I *thought* was supposed to make
it only output for fatal errors, I still get the line with my hostname,
the current time, and the request string.
How can I make this go away?
The *other* stuff is the access log. You can suppress it by assigning an empty set of outputs:
server = WEBrick::HTTPServer.new( :AccessLog => )
Or you could send it to an access log file:
server = WEBrick::HTTPServer.new(
:AccessLog => [[Logger.new('access.log'), AccessLog::COMMON_LOG_FORMAT]] )
Whatever you choose I'm sure will work out for the best.
I'm writing a WEBrick server that I want to output some status
information to the console. However, all the *other* stuff that's
getting output makes my information hard to see. Even after adding
to the server configuration what I *thought* was supposed to make
it only output for fatal errors, I still get the line with my hostname,
the current time, and the request string.