[Nitro] Webrick log

George Moschovitis george.moschovitis at gmail.com
Mon Feb 12 17:31:58 EST 2007


Aha, there is a :Logger parameter too, thanks!

-g.

On 2/13/07, Kirk Haines <wyhaines at gmail.com> wrote:
>
> On 2/12/07, George Moschovitis <george.moschovitis at gmail.com> wrote:
>
> > anyone knows how I can get rit of the following Webrick log crap?
> >
> > [2007-02-12 22:34:34] INFO  WEBrick 1.3.1
> > [2007-02-12 22:34:34] INFO  ruby 1.8.4 (2005-12-24) [i486-linux]
> > [2007-02-12 22:34:34] INFO  WEBrick::HTTPServer#start: pid=13118
> port=9000
>
> Webrick lets you control the logging destination.
>
> When you create the webrick server instance, pass it a couple of
> parameters, :Logger and :AccessLog that provide an alternative
> destination for the webrick logging.
>
>     @server = Iowa::WEBrick::HTTPServer.new(
>       :Port => @config[Csocket][Cport],
>       :BindAddress => @config[Csocket][Chostname],
>       :DocumentRoot => Iowa.app.class.docroot,
>       :Logger => swallow_logs,
>       :AccessLog => swallow_logs,
>       :CGIInterpreter => ruby)
>
> That's how my webrick handler does it.  swallow_logs is an instance of
> a "logger" that does nothing but eat whatever it is fed.
>
>
> Kirk Haines
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>



-- 
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20070213/6764f224/attachment.html 


More information about the Nitro-general mailing list